Xtend Error: Cannot find class Consumer

Problem

When deploying you Xtend application to a different environment than your development environment you might encounter an error such as:

[ERROR] symbol: class Consumer
[...]
[ERROR] cannot find symbol

Solution

This error is caused by Xtend trying to use Java 8 features. It does so when your development machine runs Java 8.

For eclipse, you can fix this by using a Java 7 JDK under Window / Preferences / Java / Installed JREs. Then ‘Clean’ your project and all references to the Consumer class should be obliterated.

For Maven, you can find more information on this page.

Windows Explorer New: Add File Types and Templates

Right clicking within a folder of the Windows Explorer allows access to a convenient way to create new files through the context menu:

This post discusses a number of ways how this context menu can be changed.

Edit Menu With Handy Tool

ShellNewHandler is a useful tool to ‘clean up’ the ‘New’ context menu. Just download and run the application and deselect the options you do not need:

Edit Menu Through Windows Registry

Search for ‘regedit’ in the windows search and open the Registration Editor. The relevant entries for the ‘New’ context menu can be found under ‘HKEY_CLASSES_ROOT’.

Specifically, the relevant information should be under the key ‘.[filetype]/ShellNew’.

Set various values within this key to control the behaviour of the New context menu.

  • Adding a value with the name ‘NullFile‘ (and no value) will create a new empty file for the extension if it’s selected from the new context menu.
  • Adding a value ‘FileName‘ with a value of a path to a file will use the pointed to file as a template for creating new files.

References

Add file types and templates (Windows XP)

Reference for Registry Entries (Windows 95)

ShellNewHandler: Useful open source tool to remove entries from the ‘New’ context menu

SSL Certificate Comparison

With recent developments brining Internet security into the spotlight (such as heartbeat), SSL certificates are easily one of the cornerstones of any Internet-enabled application.

Unfortunately, a simple Google search does not easily reveal the best options for obtaining SSL certificates. Thus, I have compiled a small list of popular SSL certificate providers.

Free

StartSSL seems to be the way to go to get a free SSL certificate. Their desktop browser support seems reasonable but there might be problems with some mobile browsers and applications.

Low Price < US$10

Low price SSL certificates (for domain validation) can be obtained from resellers. GOGETSSL and namecheap seem to be good options. In my understanding, these issue essentially identical certificates to those obtained directly through RapidSSL or Comodo.

Medium Price < US$100

Further popular providers for SSL certificates are GoDaddy, RapidSSL and Comodo. All of these offer solid certificates trusted by most browsers and platforms (though, at present, GoDaddy certificates are not supported in the latest JDKs).

This list is specifically about the most basic form of SSL certificates, which only validate your domain and not your business name. However, I think for most applications these are more than enough. While for domain-only verification I would recommend the low-price options listed above, for business name verification I would recommend going directly to a more established provider.

 

The Secret of Uncommonness

When writing only paraphrases words, phrases, ideas and concepts familiar to us, we often perceive it as boring and dull. If, on the other hand, writing consists mostly of words, phrases, ideas and concepts that are unfamiliar to us, we often perceive it as complex, difficult or even incomprehensible.

The secret of uncommonness therefore must be found in right balance between what is familiar and what is not. The following rules of thumb can guide in finding such a balance:

Begin with the Common and End with the Uncommon

A text is often easier to understand when it begins with familiar, easy and common concepts and introduces more complex and unfamiliar concepts afterward (Booth, Williams, and Colomb, 2003).

Use the Uncommon Sparsely

Think of the uncommon as some precious extra-glitter for your writing – but extra glitter which comes at a price. Since, usually, an uncommon word or concept needs to be couched in careful explanation. The more uncommon the more explanation might be required, which increases the length of your text.

Use the Uncommon to Emphasize Concepts of Particular Importance

The uncommon will stand out from your writing, and it is what the reader is most likely to remember. This makes using uncommon words and ideas to accompany ideas of particular importance an interesting choice. However, note that the key idea here should be to accompany rather than to express these ideas; since very important ideas should always be explained in the simplest way possible.

Using uncommon words, phrases and ideas is one of the most powerful tool a writer can wield in giving writing its final polish. However, like all powerful tools, it should be applied with caution. Understandability should, in my opinion, always be the key objective of most forms of writing and the uncommon easily gets in the way of this goal.

Read What You Write

Unquestionably there is value in the process of writing in itself; previously muddy ideas are clarified and new ideas emerge by bringing them on paper.

However, writing is arguably more valuable if what is written is also read (and then, hopefully, refined). Unfortunately, finding readers in our busy and information-saturated world is nothing but easy. Many writers, for instance, spend a considerable time building and connecting with an audience; for instance through book tours, presentations and social media.

Although we owe it to our efforts to publicize our creations, this might not be what everybody enjoys. I, for once, am not very comfortable with the concept of self-promotion.

Luckily, there is one reader whose attention we always can be assured of: ourselves. If you write and your writing is not read by an audience of millions, little fault falls upon you. But if you write and even you yourself do not read your writing, then why did you bother writing it in the first place?

Unfortunately, at least for me, it is often difficult to remind myself of reading what I have written myself.

One strategy to assure to overcome these difficulties is to create and/or assign a ‘reading contexts’ for any piece of writing created. Possible reading contexts could be the following:

  • A specific time; for instance, next Sunday at 3 pm.
  • An activity; for instance, before continuing my research on the Huns.
  • A resource; for instance, next time I access the document about architecture in the middle ages.

These contexts motivate us and ensure that what we have written gets read at the very least by ourselves. If this works, you could then venture to extend your readership to 2.

When am I Ready to Start Writing: Preparedness of Knowledge and Style

One of the most crucial prerequisites for writing, in my mind, is preparedness of knowledge and style.

Preparedness of knowledge entails that one has sufficient knowledge (or thoughts/ideas) of the topic one wants to write about. This seems pretty self-evident, since, as magical as the process of writing might be, we could never write say a biography of Napoleon without first gathering a set of facts about Napoleon’s life.

This preparedness of knowledge can be achieved with different depth; superficial preparedness makes you familiar with a couple of facts relevant to your writing. For instance, the time of birth of Napoleon, the place and duration of his conquests etc. While this superficial preparedness might be sufficient for certain types of writing; for instance to write a simple report about some obvious facts; it is most likely insufficient for creating exquisite writing on a complex subject. To achieve this, we will have to achieve deep preparedness. Such preparedness is grounded in a long process of collection of facts and perspectives from numerous sources.

While one easy distinguishing mark between superficial and deep preparedness lies in the time dedicated to preparation (with deep preparedness being more time-intensive), another important indicator is whether the knowledge we employ for the writing is conscious or subconscious. If we can grasps all the knowledge we require for the writing in our conscious mind (e.g. I will need to write about point A, B, C, …), we have most likely achieved only a superficial form of preparedness. If, in contrast, we have garnered so much knowledge about a topic that we cannot clearly understand the whole scale of our knowledge on the subject, we have more likely achieved a deeper form of preparedness. This preparedness enables us to write beyond our conscious plan of what we want to write. New twists and perspectives seem like they pop out of nowhere into our mind. However, they do not appear out of nothing but have grown from the extensive base of our knowledge on the subject.

Preparedness of style is a less obvious and more difficult to grasp form of preparedness. Preparedness of style assures that we have the technical skill to materialize our thoughts into well-formed words. Words, in particular, which meet the expectations of the specific type of writing we are engaged in.

As the most drastic example for preparedness of style think of mastery of language. If I never learnt a word of French in my life, I will not be able to produce even a simple shopping list written in French. However, I might well be able to do so, if I have taken some French classes and brushed up my vocabulary with a few words. My preparedness of style has increased, but would yet be insufficient to produce an essay for a French periodical.

While mastery of language is certainly an important dimension of preparedness of style, there are other, more subtle, yet possibly more practically relevant dimensions of this preparedness. The most important of these being the mastery of a particular writing style. Writing styles usually correlate with the type of output we seek to produce. For instance, the style of writing for a newspaper is quite different of the style of writing for an academic business journal, which will yet be different from writing a book about a new programming language.

The more we become familiar with a particular writing style, the more subtle differences will we be able to spot. There is, for instance, not just one style of writing for a newspaper, but one can distinguish slightly different writing styles for instance between The New York Times and The Wall Street Journal.

While preparedness of knowledge is certainly not easy to achieve, preparedness of style poses even greater challenges. While there are some style guides for languages or even for particular publications, what exactly makes up a ‘style’ is difficult to formalize; and therewith difficult to learn through traditional means.

Really the only way available is through practice; ideally with the help of a seasoned master of the style. This, for instance, is the supposed model to convey the style of academic writing, where the doctoral or master student is gently guided by a supervisor to pick up the tricks of the trade. However, given that no master craftsman is available and even if there is, it is required to learn by practicing; for instance, by critically examining the outputs one produces and matching them against one’s own ‘feeling’ of how well the writing matches with the style of the discipline.

Both preparedness of knowledge and preparedness of style are no qualities, which can be achieved in absolutes. Even the most knowledgeable expert or the most seasoned writing professional, will be able to find ways to improve their preparedness of knowledge and/or style. Try to reach the minimal level for both levels of preparedness after which you feel able to produce some coherent output. The output must not be great, not even be good. It really doesn’t matter. What matters is that you do what you want to learn. This is always the best form of practice, and in lucky circumstances even leaves you with respectable outputs for whichever goal you seek to achieve.