23 July 2016

Why are all programming languages in English?

tl;dr
That's because English (or ASCII to be exact) is the computer's native language.

What does it mean?

ASCII is the simplest code page, since you need only 7 bit  to produce. Since it was defined in America in 1960, it is obviously in English. That's when space was limited, and therefore characters accents (which are necessary for French and German, for example) were simply not included. So if I want to create a new computer language that can be imported all round the world it *must* be in ASCII, therefore in English. As a standard, all computers produced must adhere to it. Every computer in the world must be able to produce these characters. Every keyboard in the world shows those characters clearly.
If you're asking yourself how come in the pre-Unicode era did people write in a non-English language, then the answer is that in the Extended ASCII code (for characters that sits in number 128-255) the alphabet of one other languages was included (depends on the code page attached). So there was a code page for Hebrew, Greek, French, Russian, Spanish and other languages with a "simple" alphabet (around 30 letters) which isn't represented by the English Alphabet.
That's also the difference between "varchar" (which assumes ASCII code, could be the extended page; that's good enough for only one extra language) to "nvarchar (which assumes Unicode code, and therefore could include all languages).

And yet, nowadays in the new Unicode days, the first 128 characters are still our dear-old-ASCII codes.


Is it difficult to learn programming in English, for a speaker of another language?

tl;dr: no.
Functional English (to be able to speak some basic phrases) consists of 1500-2000 words. The words in any computer language consists of much smaller vocabulary:
In C there are 32 reserved words
In Pascal there are 53 reserved words
And Basic leads with 174  reserved words.
So you just need to learn "those words" in order to write code, and to know where every key is on the keyboards. That's all. And I am speaking here from experience: I remember learning a bit of computing on my brother's commodore computer when I was around 11. As the commands in any computer language are quite short, the main words I remember (in Basic) were: 
PRINT 
IF
GOTO 
and LOOP. If you are short of a word you can always use a word in your native language written in English letters, so if you want to define an object named "tomato" but you don't know how to write tomato in English, you can always get away with "tomate" (Spanish, French), 
ntomáta (Greek), pomidor (Russian) or agavania (Hebrew).

(I've read that post in my Linked In feed, by somebody who obviously knew very little about computers or linguistics, and decided to answer her questions).

06 April 2016

pfhtreadpool.cpp, line 970, function PFThreadPool::QueueWorkItemMultiple

If you get this error it is very simple:
Your Power Query in Excel is tired.
Restart your computer (or at least, log off and log back on again)

31 March 2016

Adding Australian End of Financial Year in Power BI

Alright, it took me like forever to find, but once I've found it I decided to let the rest of the universe know.
If your financial year doesn't end on December 31st and you want to set it up on a different date, there is a way to cater for it in Power BI.
The DAX code for The Australian version, for a Fiscal year that ends on June 30th:
(According to https://msdn.microsoft.com/en-us/library/ee634245.aspx)

=ENDOFYEAR(DateTime[DateKey],"06/30/2004")
Having said that, I believe that if we're in Australia (or any other place which isn't US for that matter), maybe the code should be more in the lines of:

=ENDOFYEAR(DateTime[DateKey],"30/06/2004")