Credits : Forbes


What is the hardest skill to teach in software engineering?originally appeared on Quora: the place to gain and share knowledge, empowering people to learn from others and better understand the world.

Answer by Brian Knapp, Software Engineer, on Quora:

There is one skill that is exceptionally difficult to teach or implement in any software engineering situation.

To get to that I have to tell a funny story.

Many years ago Google rolled out this incredible new feature. It was an automatic autocomplete dropdown that populated as you type. It was seriously impressive.

Technically, they had to solve a few major issues to even make the feature work.

First, they had to have the UI experience and the related javascript to populate both the autocomplete suggestions in realtime (or close enough I guess).

Second, they needed a sensible list of autocomplete suggestions based on what the user was typing. Given that the user can type literally anything into Google, there are A LOT of variations.

Third, this was potentially going to generate an enormous amount of load on the system. As I recall, the blog post announcing the feature estimated they had to increase their infrastructure by 6x to support the added HTTP requests, database calls, etc…

Doing all of that at Google scale to hundreds of millions of users and having it “just work” is pretty incredible.

Also, for those of you thinking you could implement this in a weekend with React and Elastic Search, neither of those tools really existed at the time.

Anyhow, like I said this was a very cool feature and at the time I was working on a very large nonprofit fundraising website that brought in millions of dollars in donations.

Someone saw what Google was doing and thought we needed to implement that feature on our site. It was useful for looking up events and people a bit faster, so it seemed like a reasonable idea at the time.

We had an expert JavaScript developer on the team, so the front end came together with few issues. On the back end we were using MySQL, so we hacked together a suggestions table. It was a bit gross, but it worked well enough in testing.

So, after maybe a month of development, we launched the feature. It didn’t seem like a big deal until a few hours later…

The site went down.

It looked like we had been DDOS’ed and it took about an hour to roll back everything and get back on-line.

It turns out that the JS was sending an AJAX request on every keystroke. So, if a user quickly typed “John Doe” into the search, it fired off eight HTTP requests. Even worse, the first 7 requests were instantly useless.

It became obvious why Google had to increase their infrastructure to match the feature. The team lead hadn’t considered that at all.

The solution was simple enough, set a timeout to wait at least a half second or second after the last keystroke before doing the autosuggest. Also, we ended up later using ElasticSearch for the search backend once it was available.

The point of this story is two-fold.

One, the website being down for an hour that day probably cost anywhere from $10,000 to $100,000 in donations. That is nearly one FTE salary for a whole year (depending on the position and the actual loss amount).

Two, the entire feature didn’t need to exist. It was a “nice to have” that wasn’t guaranteed to make the app better. Yet, it came with huge downside risk that hit us very hard.

All of this could have been avoided if the team had approached software engineering from a minimalist approach.

The fastest code is the code that doesn’t run at all.

Running fewer SQL queries is better than running more queries.

Fewer features means less complexity.

Fewer libraries means less complexity.

Fewer tools means less complexity.

Complexity costs time.

Complexity costs money.

Doing nothing is better than doing something useless.

A mature software engineer will do everything in their power to avoid complexity and code where possible.

Minimalism in software engineering is nearly impossible to teach.

It’s difficult to build a team around. Most people would rather pile on libraries, gems, new technology, and so on in the pursuit of laziness.

Technical debt is the new normal and everyone is happy to never pay it off.

So, in practicing minimalism in software engineering, that is to say the approach of building the least amount of software with the fewest tools, is not a skill that common or easy to teach.

Programmers love to pile on layers of “stuff”. It’s practically impossible to get around that in an organization larger than 1 person.

This article is shared by | A leading resource of inspired clone scripts. It offers hundreds of popular scripts that are used by thousands of small and medium enterprises.

Credits : Forbes


As a Software Engineering Manager, how can I continue growing my technical skills?

A lot of the techniques I recommend may apply equally well for engineers who aren’t making the switch to management, but I do think the risk is higher for managers and so it requires more deliberate investment. Engineers who are spending most of their time writing code are learning by doing, and are constantly reminded of how important it is to learn new things. However, managers may spend most of their time on non-technical issues, and so it’s easy to under-invest in technical knowledge.

The first step is to convince yourself that technical knowledge is important to your career as a manager. Firstly, while I do think that great managers can still support a team well if they are not technical experts in that area, all else equal, more technical knowledge will make you a better manager. For starters, it will be easier for your team to trust you and find you credible. It will also enable you to ensure your team is making the right technical decisions. Next, it will make it easier for you to coach your team, assess how they’re doing, and teach them to grow their own technical skills. Finally, especially in a field like software, there’s a risk that the industry will “drift” and your knowledge will become stale. So even if you’re in good shape now, it will still require constant investment to maintain your level of understanding.

Next, you need to find techniques that work for you. I find a mix of the following to be helpful:

Reading: I probably spend 30-60 minutes per day reading.

Blogs and articles:
I use Feedly primarily for this, and whenever I find anything online (on social media, etc.) that hasn’t made it into my Feedly, I add the source to Feedly. I also basically have a habit that whenever I have some downtime I try to open up my Feedly instead of social media. Hundreds of articles make it into my feeds, and though I only read a small subset of them, it’s still valuable to skim the headlines to see what people are writing about. So this also works a bit like a “discovery” mechanism to help me identify things I can invest more in learning using some of the techniques below. Basically, if I find something that seems like it’s important to my job or to engineers on my team, but I feel like I don’t understand it and can’t coherently explain it, it’s something I’ll find a way to learn more about.
More recently, I’ve tried to find curated or community-based newsletters. To name some of my favorites, I use DiscoverDev, O’Reilly’sFour Short Links, and HNDigest (which is just a daily aggregation of the top threads on HackerNews, that way I don’t have to remember to visit it myself). Sites that have discussion threads attached to links are valuable for supplemental content and to help me gauge the credibility of an article if it’s on a subject I know less about. If you have other recommendations, leave them in the comments and I can add them!
A lot of people I look up to recommend investing in a good Twitter account, but again, I’d rather not have the upkeep of building out my follows (I don’t use Twitter that often). There are some hacks, like using Nuzzel to see someone you look up to’s Twitter feed.
There’s always a bit of a lag between what’s happening in industry and what makes it into books, and they’re also a larger investment (of time and money), so I use them mostly for meaty, more evergreen content. Things like writing clean code, technical architecture, systems design, etc. are great book material. Sometimes, books are also a great way for me to pick up a new technology (I skim the book, then can use it for reference later), but if the technology itself is really new, technical documentation might be a better way to learn.
I also read a lot of non-technical books (and to force myself to understand and remember then, I try to write summaries on Quora).
Quora is also a great place to find content that is a little more authentic and less polished than books or even blog posts. You might think I’m biased since I work here now, but I’ve always found it a valuable resource, even before I joined the company (in fact, it’s one of the main reasons I was so excited to join).
Talking to people:
I try to stay in touch with smart former classmates and colleagues. The primary reason is mostly because I value the relationships directly, but as a side effect, it’s an awesome network to tap into for learning things. Whenever we catch up, I try to ask them questions about how their current company does things, or what they’re learning and if they have any advice for things I can learn.
Another great channel for learning new things is interviews. As a manager, you’re probably interviewing other people from different companies all the time. I use this opportunity to ask people what sort of things they’re learning, how they’ve solved certain technical problems in previous roles, and how they might solve certain technical problems I or my team are facing at the moment. It’s actually a great way to both learn things, and get signal on what sorts of things a candidate finds exciting and how they solve problems. I’m also “meta-learning” as I do this. For instance, if they tell me they used a particular technology to solve a problem, I asked them how they learned about that technology in the first place. You should, of course, make sure you don’t do this in an exploitative way (for instance, don’t ask a candidate to divulge anything that might be sensitive or confidential).
I find it really valuable to carve out time to just write code and try new things. As a manager, I don’t have as much time to do this at work (and also, I don’t want to necessarily be limited by my company’s current projects), so I often do this outside of work. For instance, things that I’ve explored within the past few months include: Amazon’s SageMaker, Terraform, Apache Spark, Apache Kafka, and Golang. Sometimes it’s just getting the tool set up and playing around with it, doing some tutorials, or building a fun side project. Trying things out helps go beyond.
I actually have a whiteboard at home next to my desk where I maintain a list of things I’d like to try out if I had more time. That way, when I do get that random downtime, I use that list. Random downtimes in my past have come in the form of everything from cancelled plans on a weekend, to being stuck at home due to really bad weather, to being under curfew during the Egyptian revolution.
Meetups: I’d like to do more of these, it’s just logistically more difficult than some of my other techniques, and I haven’t cracked the best way to make the most of the time I spend on them.
Conferences: Even though I don’t attend them in person all the time, many conferences will upload videos or summaries of talks given there, and those tend to be really valuable as well.
Find something that works for you. Different people learn in different ways, so if you find it enjoyable, and can incorporate it into your normal work/life time, you’re a lot more likely to stick with it.

This article is shared by | A leading resource of inspired clone scripts. It offers hundreds of popular scripts that are used by thousands of small and medium enterprises.

Credits : Theserverside


Whether you’re a seasoned Java programmer or a Java neophyte, testing Java applications is important. It ensures your application does what it’s supposed to.

Fortunately, there are plenty of automated testing tools for Java. In fact, there are so many it can be difficult to know which tools to adopt and use. To help solve that dilemma, we’ll discuss some of the most useful automated testing tools for testing various aspects of Java applications.

Types of Java testing tools

It’s important to note not all testing tools are designed to serve the same purpose. There are multiple types of testing associated with Java applications:

  • Unit testing helps you test newly written code before it is integrated into your codebase.
  • Integration testing ensures that new code will not break other parts of the application.
  • Performance and user experience testing verify your application is sufficiently responsive, stable and user-friendly.
  • Security testing helps identify security vulnerabilities in Java code.

(This list is admittedly not completely inclusive. We haven’t mentioned system testing and acceptance testing, for instance, although these overlap somewhat with performance and user experience testing.)

Some automated testing tools for Java support only one type of testing, but many can actually support multiple categories of test automation.

Best automated testing tools for Java

GitHub hosts nearly 2,000 repositories with the term “java testing” in their name. Not all of those correspond to distinct tools, but it gives us an indication of just how many automated Java testing tools are out there.

So which tools should you learn? Here’s a quick guide through the valuable automated testing tools for Java applications.


As its name implies, JUnit is a Java testing tool designed for unit testing. It’s probably the most widely used unit testing tool for Java applications.

On its own, JUnit is not useful for much beyond unit testing. However, you can use it in conjunction with other Java testing frameworks to help automate other types of testing, like integration and acceptance tests. You can even use it in conjunction with Selenium.


TestNG is a general-purpose Java testing tool that supports a range of test categories: unit tests, functional testing, integration tests and more. As such, TestNG is a versatile tool to have in your Java testing arsenal.


JTest is a Java testing tool that has been around for more than twenty years. Like TestNG, it is designed to support a broad set of test types. It’s another useful all-around Java testing tool to have on hand.

What makes JTest particularly interesting, however, are its static analysis features. You can use them to detect performance problems and security vulnerabilities within Java applications. Few other general-purpose Java testing tools extend into these testing categories.

The Grinder

The Grinder is a load testing and performance testing framework for Java. It helps to ensure that Java applications can handle the traffic that deployment teams intend to throw at them. You write your test scripts in Python — specifically, the Jython implementation — which makes Grinder an ideal Java testing tool for performance testing.


Gatling is another Java performance testing tool. It uses a domainspecific language (DSL) for test scripts, which is one major difference between Gatling and The Grinder. Gatling also provides detailed performance testing summary reports. If you’re someone who likes having analytics data summarized in graphs and charts, you’ll like Gatling.


Selenium is the most widely used tool for interface and user experience testing. It supports tests on virtually any of the major web browsers, as well as Linux, macOS and Windows.

Selenium’s major limitation is that it is not designed for testing mobile applications. For that task, you’ll want a tool like Appium or Selendroid, which are based on Selenium.


To test modern Java applications efficiently, you often need to take advantage of mocking. Mocking lets you simulate external resources to see how they interact with your application. You can therefore test your application as if it were running in a real-world environment, but without having to set up an actual environment.

Mockito is one of the leading mocking frameworks for Java testing. Used in conjunction with a unit testing tool like JUnit, Mockito makes it fast and easy to write automated Java tests.


If you want to take advantage of mocking but find Mockito overly complicated or limited in functionality, PowerMock can help. PowerMock is a unit testing framework for Java that extends the functionality of Mockito — as well as EasyMock, another mocking tool. It lets you do things that Mockito can’t, like mocking of static methods.


Arquillian is a somewhat lesser known, but quite interesting, automated testing tool for Java. Arquillian’s goal is to allow developers to test on a large scale without mocking.

Instead, Arquillian lets you write tests that execute in real runtime environments. The idea is to provide the flexibility and efficiency associated with mocking, while delivering the accuracy of tests performed in real environments.This approach can seem a bit unorthodox to old-school Java developers, but it can prove valuable.


The list above is by no means exhaustive. There are many other automated testing tools for Java out there. And the best Java testing tool for you will depend on your needs and preferences, of course. But it always helps to familiarize yourself with some of the handiest tools for various kinds of testing with Java applications.

This article is shared by | A leading resource of inspired clone scripts. It offers hundreds of popular scripts that are used by thousands of small and medium enterprises.

Credits : Arnnet


NetSuite partner JCurve Solutions (ASX:JCS) has announced the acquisition of the business and assets of Sydney-based Riyo Business for $600,000.

Riyo Business’ software, Riyo, is a platform to provide on-demand or scheduled booking, dispatch and payment (BDP) services to businesses.

JCurve told shareholders on 14 May that the Riyo platform has been successfully piloted with two enterprise customers in Australia.

“The acquisition of the Riyo software platform adds to our growing suite of solutions,” JCurve Solutions CEO Stephen Canning said.

“We are purchasing a robust, scalable, industry standard technical architecture which has been successfully tested through product trials. The software platform could be rolled out in its current state or may be developed into other verticals and integrated into our ERP offerings,” Canning added.

Canning also told shareholders that JCurve expects the acquisition to be Earnings Per Share “EPS” accretive in the short term, to deliver long term shareholder value. He also said that the acquisition is in line with JCurve’s diversification strategy.

“The Riyo software platform is a disruptive technology which has multiple potential commercial applications,” Riyo Founder and CTO Adam Kundrat explained.

“Customers demand convenience, transparency and engagement in a single, mobile experience. The Riyo software platform leverages advanced technology to deliver this experience.”

JCurve posted a net profit before tax loss of $161,864 for the six months ending 31 December 2017. Overall, the Sydney-based cloud technology company closed the half year with net profit after tax (NPAT) of $393,427.

The revenue for the period increased by 11 per cent, to $5 million, as a result of organic growth, the company told shareholders on 21 February.


This article is shared by | A leading resource of inspired clone scripts. It offers hundreds of popular scripts that are used by thousands of small and medium enterprises.

creduts : Jaxenter


Technical expert Infomentum has partnered with IT education organisation EDITx to host the UK’s first Java challenge, launching on April 9, 2018.

The challenge invites Java students and professionals alike to enter an online gamified competition. They compete in separate leagues, alongside their peers, so that everyone gets a fair chance to be crowned UK Java Knight.

Both renowned Java experts and University Professors accepted to play the game as jury members and to write the questions of the challenge.

The jury members are :

  • Helene de Ribaupierre: Lecturer at Cardiff university
  • Oliver Szymanski: Founder of the Association of Java User Groups, Speaker & Director at Source Knights Ltd.
  • Mani Sarkar: Software Craftsman, Java/JVM Developer, Conference speaker, Blogger, various dev. comm. & conf, infra/containers/virtual tech & Steering Committee Member at DevoxxUK
  • Mauricio Salatino: Author, International Speaker & Principal Software Engineer at Alfresco
  • Siva Narayan: CTO, Author, Key Note Speaker – “Data Asset” “The Next Data Rush” at Focus Group Ltd.
  • Maurice Naftalin: Java Champion, Author, Speaker, Associate at JavaSpecialists.EU & Technical Director at Morningside Light Ltd.
  • Carlos Matos: Senior Lecturer at Royal Holloway University of London
  • Sandro Mancuso: Author, International Speaker, Founder of the London Software Craftsmanship Community, Software Craftsman & Managing Director at Codurance
  • Peter Lewis: Lecturer in Computer Science at Aston University
  • Peter Lawrey: Java Champion, Blogger, Speaker & CEO at Higher Frequency Trading Ltd.
  • Michael Kölling: Vice Dean for Education, Faculty of Natural and Mathematical Sciences at King’s College London
  • Jens Krinke: Senior Lecturer at University College London
  • Jeroen Keppens: Lecturer at King’s College London
  • Dan Hardiker: Chief Technical Officer at Ltd.
  • Antonio Filieri: Lecturer (Assistant Professor) at Imperial College London
  • William Clocksin: Dean of the School of Computer Science at University of Hertfordshire
  • Jaap Boender: Lecturer at Middlesex University London
  • Rabih Bashroush: Reader at University of East London
  • Ruben Badaró: Executive Director at Morgan Stanley
  • Shaha Alam: Oracle Fusion Middleware Consultant at Infomentum

The rules are easy: The participants have 15 minutes to give the correct answer to as many Java questions as they can (maximum 17 questions). The questions are multiple-choice with one or several good answers and an associated score 1, 2 or 3 points if answered correctly. A wrong answer results in a score of (-1) irrespective the level of the question.

The Challenge allows the usage of three “jokers”: the “50/50”, “Ask the challengers”, and “Ask a friend”. The total score will be the cumulative score of all questions answered within the set time frame of 15 minutes.

After 2 weeks, hundreds of Java profiles located all over the United Kingdom registered and participated in the challenge. The challenge is still open for 3 more weeks (ending May 25, 2018).

Last week, the companies Cisco and Dimension Data were organizing a Python challenge. A 16 years old boy surprised everyone by ranking second at the finals in the Cisco Head Office in Brussels.

The current leader in the IT Student category comes from the University of Leeds; his score is 58. The current best professional is working at Amazon Development Center; his score is 68.

The youngest participant is currently 18 years old and the oldest is 73 years old.

Three main purposes for contestants

(a) Fun, emotion and a bit of stress; a great competition with prizes to win.

(b) It’s an opportunity to learn some things: participants can refresh or improve their skills, benchmark themselves and compare to others, learn more about Java or just discover it.

(c) It’s a place suited for social interactions between contestants; they can follow Java leaders and influencers (the jury members!)

What’s in it for you

  • First Prize Student & Professional: £800 flight voucher for use on your choice of over 300 airlines
  • Second Prize Student & Professional: £500 voucher to be used for an experience of your choice. You could: have a romantic getaway, experience a supercar driving track day, spend a weekend glamping in a treehouse or more!
  • Third Prize Student & Professional: £250 Amazon gift voucher

Infomentum, the sponsor of the challenge may contact the participants:

  • To share challenge results
  • To award the prizes to the best participants
  • To share future intern or job opportunities


“Swot up and think laterally. The answer you seek is right in front of you.” – Dan Hardiker, Chief Technical Officer at Ltd.

“My main advice for the contestants will be to pay a lot of attention to detail.” – Carlos Matos, Senior Lecturer at Royal Holloway University of London

“Use the jokers at the right time and keep a close eye on the clock.” – Alexandre Dembour, Partner EDITx


This article is shared by | A leading resource of inspired clone scripts. It offers hundreds of popular scripts that are used by thousands of small and medium enterprises.

Credits : Eurekalert


The Project Jupyter team has been honored with an Association of Computing Machinery (ACM) Software System Award for developing a tool that has had a lasting influence on computing. Project Jupyter evolved from IPython, an effort pioneered by Fernando Pérez, an assistant professor of statistics at UC Berkeley and staff scientist in the Usable Software Systems Group in Lawrence Berkeley National Laboratory’s (Berkeley Lab’s) Computational Research Division.

The award and a prize of $35,000 will be presented to the team at the ACM Awards banquet in San Francisco on June 23, 2018.

Project Jupyter is an open, international collaboration that develops tools for interactive computing: a process of human computer interplay for scientific exploration and data analysis. The collaboration develops applications such as the widely popular Jupyter Notebook, an open-source web app that allows users to create and share documents that contain live code, equations, visualizations and narrative text.

Today, more than 2 million Jupyter Notebooks are hosted on the popular GitHub service, covering technical documentation to course materials, books and academic publication. Jupyter has been transformative in scientific collaborations and reproducibility, as exemplified by its use at the LIGO observatory, whose discovery of gravitational waves was recognized with the 2017 Nobel Prize in Physics. The LIGO Open Science Center publishes Jupyter Notebooks that allow anyone to replicate their original analyses. Jupyter Notebooks also serves as a core infrastructure for research endeavors like the Department of Energy (DOE)-funded KBase platform for predictive biology, the GenePattern Notebook project from the Broad Institute and UC San Diego and the European Union-funded OpenDreamKit project that is building virtual research environments for mathematics.

JupyterHub supports the deployment of Jupyter tools in multiuser environments, from small research groups to universities, companies and other organizations. JupyterHub is used in numerous commercial companies, research at facilities such as CERN and high-performance computing centers like DOE’s National Energy Research Scientific Computing Center (NERSC) and San Diego Supercomputer Center (SDSC).

“The flexibility of the Jupyter architecture makes it easy to deploy in a variety of scenarios: while individual users can run the tools on a personal laptop or workstation, the same tools can be deployed on remote resources,” says Shane Canon, a project engineer at NERSC. “In fact, NERSC offers Jupyter as an interactive tool for remote access to its supercomputing resources.”

At UC Berkeley two new courses Foundations of Data Science and Principles and Techniques of Data Science, will be supported by Jupyter Notebooks deployed in the cloud and integrated with campus authentication. The courses are being offered as part of UC Berkeley’ new data science major. Pérez will be teaching the upper-division course Principles and Techniques of Data Science.

In industry, the Jupyter Notebook is widely used as a daily computation and data-analysis tool, and major companies have created hosted services based on Jupyter. Google’s Cloud DataLab, Microsoft’s Notebooks on Azure and IBM’s Data Science Experience all offer Jupyter Notebooks on their respective cloud infrastructure.

In education, at least 45 different courses use Jupyter Notebooks to teach a wide variety of subjects, including high-school level Computer Science, Aerodynamics, Numerical Methods, Statistics, Computational Physics, Cognitive Science and Data Science. These have been deployed at leading universities in the U.S. and abroad, including UC Berkeley, Cal Poly, MIT, Harvard, Columbia and Imperial College.

As a graduate student studying physics at the University of Colorado in the early 2000s, Pérez remembers using a hodgepodge of software systems to illustrate code, equations, visualizations and text in his scientific computing papers. This inspired him to create a unified environment for scientific computing. He found researchers around the globe that had all independently started building scientific computing tools in Python and combined these disparate efforts into one open-source platform called IPython–“I” for interactive. The program was free, and anyone could inspect its code, modify it and make the output available under liberal licensing terms.

Over the years, IPython evolved to meet the needs of various communities and in 2014 project rebranded itself as “Jupyter” to recognize the fact that it was no longer just for Python. In 2015, Pérez and Brian Granger of California Polytechnic University, San Luis Obispo received $6 million from the Leona M. and Harry B. Helmsley Charitable Trust, Alfred P. Sloan Foundation and Gordon and Betty Moore Foundation to expand and improve the capabilities of the Jupyter Notebook.

Since then, Pérez and Granger have secured additional funding from other sources like the DOE and industry partners like Google, Microsoft and Anaconda Inc. Companies such as Bloomberg, IBM, Microsoft, Netflix, Rackspace and Anaconda also support the project, either with services or with the time of engineers who actively contribute to Jupyter’s development. The next-generation user interface for the Jupyter Notebook, known as JupyterLab, is currently being developed in an open collaboration with team members and engineers from Bloomberg and Anaconda.

“One afternoon in late 2001, I was a physics graduate student at the University of Colorado working on my dissertation and decided to spend an afternoon writing the original, tiny version of IPython,” says Pérez. “I could not have imagined that this would grow into a worldwide platform almost two decades later. For me, it’s been a wild ride, made possible by going from a personal exploration to an open collaboration with an incredible team ”

“This is a project that has demonstrated 20 years of intellectual contributions with major impact in research, education and industry, and it continues to make its advances available to the world as an open platform,” says Kathy Yelick, Associate Laboratory Director of Berkeley Lab Computing Sciences. “The ACM System Software Award is an incredible honor, and this team is entirely deserving of this recognition.”


In addition to Pérez, other members of the Jupyter Project collaboration include Brian E. Granger and Carol Willing (Cal Poly San Luis Obispo), Matthias Bussonnier (UC Berkeley BIDS), Paul Ivanov and Jason Grout (Bloomberg), Thomas Kluyver (European XFEL), Damián Avila (Anaconda, Inc.), Steven Silvester (JP Morgan Chase), Jonathan Frederic (Google), Kyle Kelley (Netflix), Jessica Hamrick (DeepMind), Sylvain Corlay (QuantStack), Peter Parente (Valassis Digital).

NERSC is a DOE Office of Science user facility.

Disclaimer: AAAS and EurekAlert! are not responsible for the accuracy of news releases posted to EurekAlert! by contributing institutions or for the use of any information through the EurekAlert system.

This article is shared by | A leading resource of inspired clone scripts. It offers hundreds of popular scripts that are used by thousands of small and medium enterprises.

Credits : Laravel-news


Updates to the Heredoc and Nowdoc syntaxes proposed in a RFC have been made for the upcoming PHP 7.3 release. The updates focus on improving look and readability:

The heredoc and nowdoc syntaxes have very rigid requirements. This has caused them to be, in-part, eschewed by developers because their usage in code can look ugly and harm readability. This proposal therefore puts forth two changes to the current heredoc and nowdoc syntaxes:

  1. To enable for the closing marker to be indented, and
  2. To remove the new line requirement after the closing marker

The current implementation as of PHP 7.2, might look like this simple example:

class foo {
    public $bar = <<<EOT

In 7.3, the following is valid:

class foo {
    public $bar = <<<EOT

The indentation of the closing marker determines how much whitespace gets stripped from each new line within the heredoc/nowdoc:


// 4 spaces of indentation
echo <<<END

In the current implementation of PHP 7.2, a new line must be present to terminate a heredoc/nowdoc. PHP 7.3 removes this requirement:



$values = [<<<END
END, 'd e f'];

Background on Heredoc and Nowdoc

Nowdoc is available in PHP as of v5.3.0 and differs from Heredoc in the same way that a double-quoted string differs from a single quoted string. No parsing is done inside a Nowdoc, which has added single quotes around the opening marker:


$name = 'Example';
$str = <<<'EOD'
Example of string $name
spanning multiple lines
using nowdoc syntax.

The above nowdoc output will be the literal string:

Example of string $name
spanning multiple lines
using nowdoc syntax.

A Here Document is defined as follows:

In computing, a here document (here-document, here-text, heredoc, hereis, here-string or here-script) is a file literal or input stream literal: it is a section of a source code file that is treated as if it were a separate file. The term is also used for a form of multiline string literals that use similar syntax, preserving line breaks and other whitespace (including indentation) in the text.

The addition love given to Heredocs and Nowdocs should make using them in PHP more readable and less error-prone due to indentation and end in a newline. Also, the output formatting will be much cleaner because of stripping the indentation based on the closing marker.

This article is shared by | A leading resource of inspired clone scripts. It offers hundreds of popular scripts that are used by thousands of small and medium enterprises.