Monday, October 13, 2014

Delphi Programming Popularity Increases in 2014?

Do you Believe the Delphi-Programming Statistics?


TIOBE Programming Language Popularity Index for October 2014 —Delphi Popularity Soars?

The TIOBE Programming Language Popularity Index for October 2014 shows Delphi / Object-Pascal moving upwards 6 notches from #17 at this time in 2013 to position #11 in 2014.  My use of question-marks in the blog title and main heading perhaps says it all: I question the accuracy of these rankings / statistics.

This is not to say I have not referred to these rankings before to back an observation I have made personally about various programming language and technology trends. In fact, I used the index to demonstrate how Google Dart popularity was rising in 2013 (in fact Dart is now #17 vs. #81 a year ago). I also believe the May, 2013 blog I wrote questioning whether Delphi programming is dead, and which referred to the TIOBE index at that time also, can lean on such rankings for some backing-data.  So, can the index be "wrong" and still offer enough "right" information to add value to an argument or decision-making process on occasion?

First, a bit of background on this programming-language-popularity index...

As quoted from the TIOBE site (hereinafter, "Quote A"):
"The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted when starting to build a new software system."
and
"The TIOBE Programming Community index is an indicator of the popularity of programming languages."
Yeah, right!  Delphi is obviously taking off now (sarcasm abounds)! 

My Opinion, Explained

I believe I can understand how such a statistical move — like this current apparent substantial (and difficult to believe) resurgence in Delphi popularity — can be explained, given the key indicator this index is based on:
"Basically the [ranking] calculation comes down to counting hits for the search query (across 25 search engines) for: +"<language> programming""
Essentially, I posit that the TIOBE index is fundamentally flawed and a rather absurd way to truly know the "popularity" of a programming language, because [web] search behavior is not well-correlated with actual programming language activity, software projects, or technology hiring, and here is why...

The flaw in the index, in my opinion, is especially amplified in the case of languages that are "niche" or insignificant or perhaps even entering obsolescence, and the flaw exists not just as languages are sliding out of favor but also as new ones are fighting to get noticed as the next great software development language of choice.

Aside from maybe giving a slight bit of insight into "macro shifts" in the appeal and perhaps adoption (or lack thereof) of certain programming languages, I do not see much real value in this index.  The rankings of "stable" languages that occupy the top few ranking positions over long periods of time —  C, Java, Objective-C, C++, and C# which collectively hold the top 5 rankings currently — seem semi-believable, but, you cannot tell me that Delphi is more popular than JavaScript in 2014 (as the TIOBE index currently shows JS one step below Delphi) and that my programming skills repertoire would be better served knowing Delphi than JavaScript right now.  That is absurd.  Just search indeed.co.uk for London jobs mentioning Delphi skills (be sure to ignore the 6 unrelated hotel-operations software named Delphi) and compare the 3 (YES, THREE TOTAL DELPHI JOBS in London) to the nearly 2000 jobs in London that require JavaScript skills.

So, how could the TIOBE index be so wrong, and how can I have been so right when I pondered whether Delphi programming is dead last year?

Popularity skewed by unemployed Delphi developers?

I am sure I am not the only Delphi developer that is curious about the (minimal) presence of Delphi jobs, the current state of Delphi programming languages and tools, and so forth, that searches the web on a semi-regular basis using search-terms including "Delphi programming jobs" or similar phrases.   This search activity does not imply I have coded a single line of Delphi recently, nor does it mean there are any substantial number of Delphi software development projects to be found anywhere — in fact, such searches generally confirm the opposite: there are incredibly few Delphi jobs and Delphi programming opportunities anywhere, from what I see (especially relative to other "popular" languages on that programming-language index page).

So when I and others (that have Delphi skills which are essentially wasting away as fewer and fewer Delphi opportunities exist) go searching the web on the off chance there is actually a software development project that could use my Delphi programming skills (and actually pay me for those skills), we are somehow upping the "popularity" of Delphi according to TIOBE index.  This is just wrong.

As I put forth when positing this argument in the first place, I believe niche programming languages are going to be much more likely produce massive distortions in the popularity rankings for varied reasons.  First and foremost, software developers and programmers want to know that their skills may actually earn them money!  As such, they search for jobs that use: 1) the skills they already have, even if those skills are falling out of favor in the mainstream programming circles, and 2) skills they may be able to quickly migrate to in order to gain employment, maintain employment, and/or up their earnings with (ideally while not choosing "another Delphi" that turns out to be a career dead-end).  Period.

The first search-reason (i.e., finding jobs using one's existing skills) is where Delphi falls, and perhaps since Delphi is such a fantastic software development platform it encourages those with Delphi skills to be ever-persistent in their search for anyone willing to employ them using Delphi instead of another language. The second reason (i.e., finding skills to migrate to that will get one employed) is where things like Google Dart fall, and for all I know it is where Delphi developers are looking (in addition to JavaScript users that want true object-oriented class-based development) since the Dart language and features looks a lot like Delphi (certainly more so than JavaScript).

In any case, I believe the TIOBE index needs to be substantially altered in order to remain relevant.  In order to address Quote A with any real credibility, it needs to incorporate some job-postings data.  You cannot tell me that my programming skills are up-to-date if there are essentially zero jobs anywhere that actually rely on such skills.  That is just nuts.  And, a quick sanity-check on the relative rankings of "popularity" can be done by comparing even at a super-duper-high-level the number of jobs available that reference each programming language as a required skill for the open position.

I am glad the TIOBE index exists even as I find it fundamentally flawed.  I still use it for very, very high-level insight into what is going on in the programming language arena, but I also couple it with my own observations and insights for some sort of "reality checking" of the data.  Parts of the rankings are quite believable and match up with the reality I see in job postings, technology articles, presentations, and so forth, even as other parts of the rankings (like Delphi) do not.

So, take it all as you wish, and whilst busy wishing, maybe all of us that still appreciate how wonderful Delphi programming is should be wishing that there will be jobs out there to put our skills to use before we all finally give up looking and see Delphi fall off the charts completely.


Continue to read this Software Development and Technology Blog for computer programming articles (including useful free / OSS source-code and algorithms), software development insights, and technology Techniques, How-To's, Fixes, Reviews, and News — focused on Dart Language, SQL Server, Delphi, Nvidia CUDA, VMware, TypeScript, SVG, other technology tips and how-to's, plus my varied political and economic opinions.

Tuesday, July 15, 2014

How to Include an HTML File in another HTML File Without a Server or Code

Include HTML Files In HTML by Reference Without Any Server Technology

I have meant to write a blog about this for quite some time, and the newest Chrome 36 Beta release notes reminded me to do so now that yet another way of including HTML files within HTML files (without any particular server requirement and without JavaScript) exists —  i.e., you do not need ASPX and you do not need PHP or other server-side technology, and you do not need JavaScript.

The first method I will discuss is one I have used since as far back as Chrome 24, Firefox 17, and even Internet Explorer 9 (IE9) — "seamless IFrames". The second technique is the one that Chrome 36 Beta has implemented — "HTML Imports". Until all browser vendors support the new HTML imports, my "old" way will still work fine.

"How to" Include HTML Files — using Seamless IFrames

This technique is probably best described by way of example code. This way to implement "include" files in HTML5 without ANY "server" works to include any file referenced by "file:\\..." addresses or relative URL addresses.

In the “container” document (i.e., the “outer” document into which you would like to import / “include” content from another HTML file):

<div class="content">
   <iframe id="top-nav" seamless="seamless" src="include.top.nav.html" ></iframe>
</div>

Then, inside that external / referenced HTML file (in this example, “include.top.nav.html”), we simply include the HTML that we want to appear inside the iframe — in this case a simple reusable section of HTML with my navigation HTML code in it:
<div id="topnav">
   <a href="some-page-to-navigate-to.html" target="_top">link to home page</a>
</div>

Note the use of “_top” to indicate that our navigation is going to affect the outermost document; if we omit this, the contents of the iframe will be what changes during navigation instead of the contents of the outer container document.

Let us also assume we perhaps we want to style this iframe, so in our referenced CSS file we do so  — in this case I simply want to make sure it sizes to 100% of the container div's width and height:

     /*Set the seamless iframe properties; size as needed to fit embedded content*/
     #top-nav {
          width: 100%;
          height: 100px;
     }


A more complete view of the outer HTML document that includes the reusable HTML by way of the seamless iframe looks something like this:

<!DOCTYPE html>
<html>
<head>
    <title>DEFAULT DOCUMENT TITLE</title>
    <link rel="stylesheet" href="my_styles.css">
    <meta charset=utf-8>
</head>
<body>
    <div class="content">
        <iframe id="top-nav" seamless="seamless" src="include.top.nav.html" ></iframe>
        <h1 class="document-name">DOCUMENT NAME HERE</h1>
        <p>Paragraph...</p>
    </div>
</body>
</html>


Hopefully this was somewhat easy to follow.  Try it out.  This technique came in super-handy for a local HTML-Based WIKI I created that did not require any web-server to run.  I can access the WIKI pages from Chrome, Firefox, and IE and the included HTML file(s) work just fine with no web server and no dynamic language or dynamic web-page technology.


"How to" Include HTML Files — using HTML Imports (rel="import" directive)

This is an alternative serverless "include HTML file" method that has just recently come available in browsers like Chrome 36 (note: it has existed since Chrome 31, but you had to enable the experimental feature; now it is "on" by default).   If you took a look at the Chromium Blog release notes link (above), you will see a quick overview of this new technique, and I have pasted their description and example here for quick reference:

HTML Imports
HTML Imports, part of the Web Components standards umbrella, offer a way to include HTML documents in other HTML documents using <link rel="import">:
<head>
  <link rel="import" href="/path/to/imports/stuff.html">
</head>
An HTML Import can contain CSS, JavaScript, HTML, or anything else an .html file can include. This means they provide a convention for bundling related HTML/CSS/JS (even other HTML Imports) into a single package, making them a fantastic tool for delivering Web Components to users.

The first technique I showed (seamless iframes) can accomplish the same thing to an extent, but this new rel="import" technique is certainly the preferred way to go in the long term.  I look forward to this being widely adopted (hopefully sooner rather than later), but it seems Chrome is the only game in town today.  There are much "bigger picture" reasons why the rel="import" implementation is important as it is quite handy for web components packaging (something I plan to use in my SVG Dart Widgets, eventually).  Search the web for more examples and have fun with either, or both, of these ways to import HTML file contents into another HTML file without the need for server-side technologies.

Continue to read this Software Development and Technology Blog for computer programming articles (including useful free / OSS source-code and algorithms), software development insights, and technology Techniques, How-To's, Fixes, Reviews, and News — focused on Dart Language, SQL Server, Delphi, Nvidia CUDA, VMware, TypeScript, SVG, other technology tips and how-to's, plus my varied political and economic opinions.