Category Archives: Software Development

Robotic probes on Mars

The Mars Science Laboratory (MSL) is a robotic probe on a mission to study Mars with international support. It has been achieving its goals by finding signs of habitable conditions that would have supported biological life improving our understanding of the kind of environment Mars once had. It has faced delays and setbacks, but will provide necessary experience for developing future manned missions to the planet. It will also likely continue on its journey for some time exploring the Martian surface. MSL is extending the depths of our understanding of the solar system and sits at the forefront of space exploration.

The path that Curiosity has followed since landing in 2012 (Grush, 2016).

The high-level goals of MSL set by NASA are to study the soil on the Martian surface for signs of biological life. They hope to achieve these goals by equipping the rover with instruments that can perform chemical analyses on soil samples collected from the Martian surface. It also has the auxiliary goals of testing new landing techniques that include more automation and autonomy on the part of the robotic probe, which proved successful with the landing of its single rover called Curiosity on August 6th, 2012 (Amos, 2012). MSL is achieving the goals NASA set for it by finding things like silica deposits, which are associated with environments conducive to microbial life (Chappell, 2015). Interesting to consider that silica is a compound of oxygen and silicon (Si), a semiconducting material used in transistors and integrated circuits. The interesting question is whether biological life forms could be based on an element other than carbon, and one such element considered by academics is silicon because of its similarities to carbon (“Could silicon be the basis for alien life forms, just as carbon is on Earth?”, n.d.). The Curiosity rover itself almost certainly has some silicon parts too. Curiosity also recently found boron, which was a positive sign, because of its water solubility (Grush, 2016). The boron is indicative of a lake that may have once existed in the Gale Crater.

The journey of the MSL robotic probe to Mars has not been without problems and critical moments of difficulty. It has, however, been a relatively calm journey overall in comparison to other unmanned missions. During its development, the rover’s launch had to be delayed multiple times because of engineering challenges and design problems with, among other things, its heat shield (Chang, n.d.). NASA did not think it would be a good idea to compromise the mission and decided to extend the rover’s development for two more years for further testing (Matson, 2008). Testing of the rover’s equipment also led to increased costs as a result of the delays and changes to the rover. Curiosity was actually designed with shutdown features that would protect the probe in certain hazardous situations that could destroy it. On several different occasions since landing, Curiosity has put itself into a safe mode before scientists rebooted the rover. These incidents were caused mostly by software problems including memory management (Lumb, 2016). If NASA had not been able to recover the rover, it would have clearly resulted in mission failure and would mean that its retirement could not be delayed any further.

The future of MSL has mixed projections, some positive and some not as positive. Curiosity has already outlived its original expected retirement date. Even after Curiosity is officially retired, its future will still be its legacy of discoveries also leaving a lasting impact on our future manned missions to Mars. However, Curiosity has already showed signs of aging as A.I. and robotics has continued on its exponential advance since 2012. Even worse, the rover hasn’t really found any real evidence that biological life once existed on the planet, one of its primary goals. This has led Astrobiologists to consider other novel ways of finding life on the red planet. They suggest that deeper subsurface analysis for life would be better than our current method of simply finding where water reservoirs and lakes were because we could find fossils as well as microbes in groundwater (David, 2017). It’s also true that these bodies of water probably moved around as a result of continental drift caused by the shifting of tectonic plates that may actually still be occurring.

In conclusion, I feel the Mars Science Laboratory mission has gone very well despite its shortcomings. The Curiosity rover has found some positive signs, such as elements like silica and boron, which could indicate an environment that would have supported life. It may also be beneficial if we incorporated other strategies for finding life on the red planet. Curiosity, like its predecessors, is still only the beginning of our journey to Mars.


Amos, J. (2012, August 06). Nasas Curiosity rover successfully lands on Mars. Retrieved June 23, 2017, from

Chang, A. (n.d.). Mars Science Laboratory faces technical problems. Retrieved June 23, 2017, from

Chappell, B. (2015, December 18). Curiouser And Curiouser: NASA’s Curiosity Rover Finds Piles Of Silica On Mars. Retrieved June 23, 2017, from

Could silicon be the basis for alien life forms, just as carbon is on Earth? (n.d.). Retrieved June 23, 2017, from

David, L. (2017, May 09). The Search for Life on Mars Is about to Get Weird. Retrieved June 23, 2017, from

Grush, L. (2016, December 14). NASA’s Curiosity rover finds more evidence that Mars was once habitable. Retrieved June 23, 2017, from

Lumb, D. (2016, July 14). NASA’s Curiosity rover took a ‘safe mode’ nap this weekend. Retrieved June 23, 2017, from

Matson, J. (2008, December 4). Mars Science Laboratory rover delayed two-plus years. Retrieved June 23, 2017, from

Java 8 Nashorn Script Engine

For a side project I am developing in Java I needed a good JavaScript parser but the publicly documented Nashorn interface is all about compiling when I only needed an intermediate representation. It is currently possible as of JDK8u40 to use the parser to get the AST as a JSON encoded string either from a JS file being executed by the ScriptEngine or from within Java using the non-public Nashorn API.

The below image should convey to you how a simple assignment statement is broken into a stream of tokens then an AST is generated as JSON on the right. This is why symbols like * + – are called binary operators because they take two operands, ! is the logical negation and an unary operator becaues it takes only one operand. The operands can also be expressions because expressions are defined recursively in terms of expressions which can be literals, terms, or other expressions. This is how we end up with tree’s which when coupled with additional semantic information such as keywords, types, and identifiers help us do code generation. This enables you to take in one language, say GML, and spit out a completely different one like C++ which, if you don’t already know, is exactly what ENIGMA’s compiler does.

Abstract Syntax Tree

An abstract syntax tree is produced by a parser after the lexer phase breaks code into a stream of tokens.

Wikipedia has additional information on abstract syntax trees if you would like to know more.
The following StackOverflow post provides clarification between an AST and a parse tree.

This example shows you how to get the AST as JSON from Java. This was my own discovery from studying the Nashorn source code.

String code = "function a() { var b = 5; } function c() { }";

Options options = new Options("nashorn");
options.set("anon.functions", true);
options.set("parse.only", true);
options.set("scripting", true);

ErrorManager errors = new ErrorManager();
Context contextm = new Context(options, errors, Thread.currentThread().getContextClassLoader());
String json = ScriptUtils.parse(code, "<unknown>", false);

This example should give the following JSON encoded AST as I executed it on Java 8u51. This JSON encoding provided by Nashorn is compliant with the community standard JavaScript JSON AST model popularized by Mozilla.


It is important to note however that this interface may change because it’s not well documented and is new to the JSE. Additionally the OpenJDK project is developing a public interface for Java 9 that allows AST traversal in a more standard and user friendly way.

Limited documentation for the existing public Nashorn classes in Java 8 can be found below.

The following link provides a list of all of the parser and compiler options that I set above. However it is important to note that the syntax is different when setting the options inside Java where – is replaced with a period.

The Nashorn source code can be found on GitHub and also on BitBucket. I prefer the BitBucket version as the GitHub version seems to be missing some classes.

Security of Electronic Communications

One of the biggest problems facing software and technology companies as well as all major financial institutions today is the security and authenticity of electronically transmitted communications and data. When evidence of phone hacking surmounted around Piers Morgan back in Q1 2014 it was revealed that access was easily gained to victim’s voicemail recordings because they simply never changed the password (Spark, 2014). Why then do people often neglect and undermine the importance of securing their communications and what are some ways to address this? These are important cognitive, biometric, and psychological questions which must be answered in order to improve security of databases, emails, networks, and data transmission. This requires not only innovating and improving the encryption methods and techniques utilized in these systems by engineers but also changing the perception and appraisal by people, including the ordinary layman, of the problem.

During World War II the Germans used the Enigma machine to encrypt nearly all communications, which was of course until Alan Turing created the world’s first computer in the interest of automating much of the decryption process at Bletchley Park. In the process he laid the foundation of Computer Science and Artificial Intelligence positing the noteworthy Turing test as a measure of a machines intelligence. Every time you make a purchase at Amazon or, send a message on Facebook or Twitter your information is bounced between several servers, stored in databases on remote computers, and sometimes intercepted by even the National Security Agency, in offices and buildings occasionally not even in the same country as you. Merely opening an email attachment can compromise all of the data on your computer as attachments can be easily infected with Trojans and other viruses that can take over your computer, control system processes, or scan for files containing credit card numbers and upload them back to the intruder. Even if you consider yourself a modern Luddite of sorts, there is very little hope in escaping the arbitrarily encompassing technology of the digital age, unless of course you don’t mind not having a driver’s license and never taking out a loan for a house, car, or student loan.

Heartbleed was a major security vulnerability in OpenSSL, a popular open source socket security library, which could be used to bypass authenticity and security measures by the software and was in isolated instances. A Pew research poll indicated that only about 60% of adult internet users had heard of Heartbleed, and that even worse only 39% took additional steps to secure their online accounts (Rainie, 2014). Warnings of Heartbleed going largely unheeded Shellshock, a vulnerability in Bash a command prompt used in Mac and Linux, was just discovered with early estimates of 500 million affected computers (Lee, 2014). So it is evident the implications of data security on our jobs, lives, and basically our very way of life. But what can be done to address these issues? Well examples such as OpenSSL may actually be the solution and not just the problem. Open source software grants users special privileges including being able to read the source code easily without extensive reverse engineering, and sometimes even the rights to redistribute that code with certain caveats. For this reason not only were the hackers aware of the bug, so were other users of the software allowing the issue to be much more quickly addressed. With proprietary software this may not be the case, by the time the developers become informed it could be too late. We can also see companies like Oracle which are making a point of improving security in Java based applications. Their approach lately has been to promote wide spread adoption of new Java versions, which as a result of new features has been largely embraced by the community with Java 8 adoption up nearly 20% from previous releases (Oracle, 2014). Not only are they correcting the issues, they are giving users incentives to install and adopt these more secure versions. The now obsolete Windows XP operating system is the epitome of where this methodology could be applied as it is still used in many ATM machines today (Pagliery, 2014). They have been proven to be extremely susceptible to fraudulent attacks, even vulnerable enough to hacking from a cellphone!

New advances in physics are also creating promising solutions to encryption as well as classical computing problems. A lot of recent research has shown that lasers can be used to encrypt messages that cannot be deciphered without the original manifest, much like traditional asymmetric cryptography (Berridge, 2010). Optimizations in parallel processing that quantum mechanics is postulated to allow can also mean near instantaneous decryption of encrypted keys. This means that anybody or organization or corporation that can develop the first real quantum computer could decrypt every message using todays encryption standards instantly any time they want. It is no surprise then why the National Security Agency, NASA, Google, Microsoft and many other tech titans are clamoring to build these machines.

Another important aspect of this problem is the psychological importance of security and privacy that individuals feel. The most obvious issue here is that in order for passwords to be secure they also have to be somewhat hard to remember, and consider that usually people have more than 1 even 10 networked accounts on the internet for email, their student account, online bank account, social accounts and much more. Acronyms and anagrams can be conventionally applied as mnemonic devices for remembering passwords, but users generally prefer convenience. The most commonly used password for 2013 was, consistent with popular belief, you guessed it, “password” (Ngak, 2014). Many companies have begun to address this part of the problem in new ways, such as Apple which provides facial recognition locking for most iOS devices (Whitney, 2013). Besides facial recognition research is bringing new solutions such as fingerprint scanning, retina scanning, DNA tests, and other forms of biometric identification and authentication some of which are old and some of which are new. One of the most often utilized methods of preventing bots and spam on websites has been the contemporary use of optical character recognition or CAPTCHAS for example.

The problems of privacy and security have been perennial and persistent in many contexts and not just technology alone. Technology and science is not only expanding the issues but actively providing new and innovative solutions. The development of quantum computers seems to draw many parallels to Alan Turing’s creation of the first computer with grave implications. Millions of people are left vulnerable by security flaws and subject to attack, fraud, and other harm every single day. The problems of privacy and security are thus important matters that are frequently undermined and that must be taken more seriously and researched more thoroughly.


Berridge, E. (2010, September 1). Quantum encryption defeated by lasers. Retrieved October 17, 2014, from

Lee, D. (2014, September 25). Shellshock: ‘Deadly serious’ new vulnerability found. Retrieved October 17, 2014, from

Ngak, C. (2014, January 21). The 25 most common passwords of 2013. Retrieved October 19, 2014, from

Oracle Highlights Continued Java SE Momentum and Innovation at JavaOne 2014. (2014, September 29). Retrieved October 17, 2014, from

Pagliery, J. (2014, March 4). 95% of bank ATMs face end of security support. Retrieved October 17, 2014, from

Rainie, L., & Duggan, M. (2014, April 30). Heartbleed’s Impact. Retrieved October 17, 2014, from

Spark, L. (2014, February 14). CNN host Piers Morgan questioned in UK hacking investigation. Retrieved October 10, 2014, from

Whitney, L. (2013, December 20). How to use facial recognition on your iPhone. Retrieved October 19, 2014, from