The Dawn Of Quantum Computing
There are great news for those of you who’ve heard about quantum computers and quantum computations. Finally, thanks to IBM Quantum Experience site it is possible to run experiments on a real 5 qubits Quantum Processor connecting to it via IBM Cloud interface! Isn’t this sound great? It is an advancement in computing that is equal in its importance to the transition from mechanical to digital computers and it can be hardly overestimated. I recommend to read this IBM’s article that explains the endeavor before proceeding any further.
What Is It All About?
IBM Quantum Experience is aimed to bring hands-on skills in programming quantum processor. This is not a simple task taking into consideration that Quantum Computations far complex to grasp in comparison to classical computations and requires understanding of quantum physics and linear algebra. But it can be done with effort and dedication. In addition, there is a need in motivation and curiosity.
If you have no prior knowledge of quantum computations you’d better learn a little bit at this link at IBM Quantum Computing site. In addition to this, to jump deep into experimenting with quantum algorithm there is a need to revive or acquire skills in Linear Algebra (this one is at Khan Academy) and quantum physics fundamentals concepts. Preferably, it is better to have a BSc degree in physics, engineering, mathematics etc.
How To Apply?
The application is straightforward. There is a need to register at the site. Then confirm the registration. Log in and compose your first quantum algorithm. One who has no previous knowledge in quantum computation is advised to go through very detailed guide at the site.
What Can Be Implemented On This Processor?
Well, this is exactly the question that I am asking myself right now too. I’ve found that it is possible to implement Deutsch–Jozsa algorithm and to see how it works for real. Following articles may help to understand how to do it.
- Quantum Circuit
- Implementation of the Four-Bit Deutsch–Jozsa Algorithm with Josephson Charge Qubits
- Implementation of the Deutsch– Jozsa algorithm on an ion-trap quantum computer
What Else May Help?
There are additional resources that may come in handy tackling this topic.
And so it begins…
Kindle Cloud Reader in a nutshell
Those of your who buy e-books at Amazon must be aware of Kindle Cloud Reader application that provides you with a way of reading Kindle e-books through the browser at any place you like it. May it be a mobile phone, a tablet or a desktop.
Finding, buying and reading e-books is much more easier than their paper counterparts and you do not have to carry tons of books at your bag to read a few at once. In addition, digital format make it simple to look up words in a dictionary or on the internet, for instance, using Google Translate or Google search.
However, this is not the case with Kindle Cloud Reader. Currently, the is no built-in internet search or internet translate functionality in the Kindle Cloud Reader. More over, there is no option to copy and paste your favorite quotes or text snippets neither. If you’ll search at various forums you’ll see that customers desperately looking for, at least, copy functionality.
It is a very strange state of things, considering that this functionality very much exists in Android powered Amazon Kindle application as your may see in the screenshot below.
So what’s the matter with Amazon?
As a persistent Amazon customer who is pretty satisfied with their services I thought that the lack of this functionality is a mere unawareness to this issue from Amazon’s side. That is why I wrote them asking to fix this annoying discrepancy on July, 2015. And this is the answer I got.
As you may see customer support has provided no clue when it’ll be done if ever. Not to mention that they mistakenly answered me about Android application, which has this functionality built-in, when I asked about Kindle Cloud Reader. Since then almost 2.5 years have passed.
- As of today Kindle Cloud Reader Chrome extension is used by 3,649,498 users world wide. This is a large amount of user I would say.
- There is no support for basic features, such as copy, internet search, internet translate in Kindle Cloud Reader.
- Amazon Kindle application has those features built-in as you may see in the screenshot below and has only 739,148 user so far.
- Implementation of the proposed functionality must take a few hours for Amazon’s developers.
Why am I so sure that it takes a few hours to fix this?
I am sure that fixing this will take between two to three hours because due to the lack of this functionality I had to implement it myself. Thanks to this open source repository I was able to add Google Search and Translate, Copy functionality to Kindle Cloud Reader application. It is currently used by about several thousands users weekly. This amount indicates that these functionalities are needed by customers. However, since I do not understand deeply the design of the Kindle Cloud Reader it is pretty complicated to refactor this application further. In my opinion, this is exactly where Amazon must step in and introduce the fix.
Meanwhile, use Kindle Optimizer Chrome Extension if copy, search and translate is what you lack.
Check out the implementation at GitHub.
Do not miss my latest post.
Swift is here to stay
This post was inspired by a one day Swift crash course. I have to tell you that Swift is a very nice language with impressive syntactic structures that turn iOS/ OS X development into very joyful experience in comparison to Objective C.
What is also very encouraging about Swift that its core is opened source by Apple and the source code is available at GitHub. In addition, development in Swift is now possible not only under OS X, but also on Linux (Ubuntu). It is also possible to develop in Swift on Widows with OS X running under Virtual Machine, but about this later.
Current version of Swift is 2.2 and 3.0 is about to be ready later this year (2016).
Introduction from Swift.org site
Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns.
The goal of the Swift project is to create the best available language for uses ranging from systems programming, to mobile and desktop apps, scaling up to cloud services. Most importantly, Swift is designed to make writing and maintaining correct programs easier for the developer.
1. IBM Swift Sandbox
There are a number of ways to start playing with Swift. The most generic one is to use IBM Swift Sandbox web site for this matter. It makes it possible to try Swift out without buying Mac or installing VM with OS X/Ubuntu or installing Ubuntu itself.
OK. When you are at the site what you see is REPL running on Linux. And it looks just like this. And it’s kind of interpreter for Swift.
2. Swift on Linux (Ubuntu)
Currently Swift is supported on Ubuntu 14.04 and 15.10. In order to play with Swift on Ubuntu please follow very detailed how to guide from official Swift site here.
3. Swift on Windows in OS X Virtual machine
As of today Swift is not supported on Windows so Windows users must use virtual machine running Ubuntu in order to be able to develop application in Swift. On the other hand one may develop natively in Swift with VM that runs OS X on it. To be able to do this please use this YouTube detailed tutorial.
Main steps are
- Install free VMware Workstation Player
- Download OS X image from the link in the tutorial description in YouTube
- Install VMware customization batch file.
- Configure VM and run OS X under it
- Create Apple account in order to be able to download XCode via App Store.
4. Swift on OS X with XCode (pretty expensive for those of us who have no Mac)
If you already posses a Mac then it is easy to install Swift in accordance with the steps below from official Swift site.
That’s it and stay tuned.
If you haven’t heard about Mono on Linux then it is time to fill this gap.
Mono is an open source platform that implements CLI specification and enables building and runnig C# applications on Linux, OS X, Windows which is fun.
This is the official description from the site
Mono, the open source development platform based on the .NET framework, allows developers to build cross-platform applications with improved developer productivity. Mono’s .NET implementation is based on the ECMA standards for C# and the Common Language Infrastructure.
In order to start playing with Mono fast there is a need to install three things.
- You need to have Linux (Ubuntu) installed on you PC (vm). It is possible to work with Mono on Windows too.
- You need to install mono on you system with these commands in the terminal
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install Mono-Complete
- If you need more visual explanation follow this YouTube tutorial.
- Now to be able to code and build C# projects there is a need to install cross-platform IDE for C#, F# and more, such as MonoDevelop.
sudo apt-get install monodevelop
- After monodevelop package installation simply type in terminal ‘monodevelop‘ for IDE to startup.
- To learn to use this IDE you may refer to this Xamarin Studio documentation.
To create a simple project when IDE is up
- Click on create New project under Solutions section
- When new from will open select .NET under Other section
- Then select Console Project and click Next
- In the Configure your new project form name your project
- Set project location
- Click Create
- That’s it you are all set up
- Mono is good for you if you feel lonely without C# on Linux
- Mono is open source and as such contribution is more than valued
- Mono is great but it seems Stereo must have been even better
Change brings opportunities
Current post is affected by the fact that I started to work at Checkmarx company that specializes on static code analysis.
As it often happens starting new things brings unexpected opportunities and discoveries. One such discovery for me was ANTLR (ANother Tool for Language Recognition) that was written by professor Terence Parr.
The main purpose of the tool is to generate parsers based on provided grammar or as Terence Parr puts it at the ANTLR site
What is ANTLR?
ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It’s widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build and walk parse trees.
It is fun
From yesterday (12/8/2015) I’ve started to learn working with ANTLR v4 with the help of very detailed and down to earth The Definitive ANTLR 4 Reference book by Terence Parr.
If you’ll consider to read the book then you’d be better off by practicing with OS X or Linux since book’s examples are oriented to those operating systems. As David Ray puts it ‘who does still use Windows machines anyway?’
ANTLR v4 is fun to learn and practice especially if you previously had some experience with Java since the tool is written in Java itself.
OS X/ Linux (Ubuntu)
$ cd /usr/local/lib $ sudo curl -O http://www.antlr.org/download/antlr-4.5.1-complete.jar $ export CLASSPATH=".:/usr/local/lib/antlr-4.5.1-complete.jar:$CLASSPATH" $ alias antlr4='java -jar /usr/local/lib/antlr-4.5.1-complete.jar' $ alias grun='java org.antlr.v4.gui.TestRig'
There are a couple of links that make you life more interesting and happier since Terence Parr, in my opinion, is not only a very insightful programmer but he’s also very entertaining lecturer.
Well, that’s it. Here come two talks that Terence gave in recent years that are related to parsers and ANTLR.
- Video – Why Program by Hand in Five Days what You Can Spend Five Years of Your Life Automating? – 2011
- Video – The Quest for the One True Parser – 2015
- Video – ANTLR v4 with Terence Parr – 2013
- Book – The Definitive ANTLR 4 Reference – 2013
- Book – Language Implementation Patterns – 2009
- Thinks of contribution – ANTLR open source at GitHub.
- Change keeps a surprise for your
- ANTLR v4 is powerful and fun like never before
- This post is a first part of a number of posts that I plan on the subject
Why not to try Visual Studio Community 2015?
Try to follow these steps for low probability of success installation
- Download VS iso file from MS DreamSpark site
- Mount the image using instructions from How-To Geek, for instance those ones.
- Confirm Default installation.
- When you’ll find out that installation will be stuck use Your Uninstaller to get rid of VS 2015.
- When you’ll find out that removal process will be stuck (how funny) kill vs_community.exe *32 process in Windows Task Manager.
- Finally, remove VS 2015.
Now you have two options left
- Reinstall VS Community 2015 with Repair option and pray it will work this time.
- Switch to Java on IntelliJ/ Eclipse on Ubuntu (or Windows).
Recently I’ve come across an interesting article in Aviation week journal that was related to computing actually.
This article described seL4 microkernel operating system that had unique security features built-in that make this OS hard for hackers to crack. What is interesting is that seL4 microkernel was formally verified using automatic prover.
After digging a bit more I’ve found a whole new world of formal verification in general and of seL4 verification specifically.
If you are interested in formal verification of code and in microkernel operating systems then you’ll find below links useful.
In addition, the detailed article about formal verification of seL4 may be of interest as to SW so to QA engineers.
By the way seL4 OS is used in mobile phones running Android and in other security demanding platforms, such as a quadcopter unmanned aircraft and Boeing’s Unmanned Little Bird (ULB) helicopter that were mentioned in Aviation week article.
- The SMACCM project @ NICTA – general information about the project that uses seL4 in UAV.
- Mathematically Verified Software Kernels: Raising the Bar for High Assurance Implementations – General Dynamics’ whitepaper on the subject.
- How to get started and source code – seL4 site.
- Comprehensive Formal Verification of an OS Microkernel – detailed article about seL4 formal verification.
- seL4: Formal Verification of an OS Kernel – detailed article about seL4 formal verification more concise than previous one.
- Formal Memory Models for Verifying C Systems Code – Harvey Tuch’s fascinating PhD thesis on the subject.
- Formal verification methods were made practical and affordable.
- If you need secure general purpose operating system consider seL4.
Why use it?
Adds instant Google Search and Translate functionality to the Kindle Cloud Reader.
If you want to
- Search text from Kindle Cloud Reader in Google in an instance
- Translate text from Kindle Cloud Reader in Google in an instance
- Copy text from Kindle Cloud Reader into Google Search with ease
Then Kindle Optimizer extension is just for you!
How to use it?
- Add Kindle Optimizer from Chrome Web Store.
- Log in to your Kindle Cloud Reader account.
1. First time a text is selected additional ‘GSearch’ and ‘GTranslate’ tabs may not appear in pop-up
(the workaround is to select text again).
NOTE: It is based on the open source from here
Take care and spread the word.