Working with different programming languages allows you to compare certain features between them. Convergence between languages, (and also frameworks) becomes noticeable: It seems new language- and framework features are āborrowedā from other language- or frameworks, or are sometimes the result of ātaking the best of both worldsā. Multi-value returnā¦
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
ā Live Streamingā Interactive Chatā Private Showsā HD Qualityā Free Actions
Free to watch ⢠No registration required ⢠HD streaming
Swift and the principle of Maximal Surprise (part I)
These days Iāve taken upon myself to do some Swift code review for one of my students, even if I personally donāt write Swift. My idea was that after you know several programming languages, it should be easy to read yet another one.
Swift, on the other hand, has a bunch of surprising features up itās sleeve. Iāve marked this post with (part I) because I plan to come back with some more examples when Iāll find more time.
One surprising feature is the keyword convenience which specifies that a constructor is not the main constructor, but instead:
Convenience initializers are secondary, supporting initializers for a class. You can define a convenience initializer to call a designated initializer from the same class as the convenience initializer with some of the designated initializerās parameters set to default values. You can also define a convenience initializer to create an instance of that class for a specific use case or input value type.
I keep wondering: is this aspect such an important information that one should have a keyword in the language for it?
A recent project had me looking for cheap micro-controllers that are supported by a particular industrial automation platform. As part of this, I found that the most readily available micro-controller runs on 16-bit DOS and the last supported compiler is more than a decade old, so it carries this disclaimer:
The Software was not designed to operate after December 31, 1999. It may be incomplete and it may not function properly.
This just blew me away. Itās one thing to work with experimental software thatās still in development, but itās another to start a new project with something that has been out of service for more than 15 years! The only other commercial compiler that advertised support for this platform wasnāt even available upon request; the sales rep was just astonished that I wasnāt looking to doĀ āmodern app developmentā. I asked if or where the compiler was available online and never got a call back! Luckily for my sanity, the project didnāt get far off the ground after these discoveries. I only got a little way through finding the gritty details of what part of the compiler was really required. The hardware specs for the test platform didnāt meet some of the smoke test requirements for our application without some serious compromises.
This experience of finding an abandoned, but still required platform got me thinking about other legacy systems and how and why they can stay relevant. I guess this shouldnāt surprise me too much, as I worked on OpenVMS as my primary development platform for almost 2 years. That OS doesnāt even hold a candle to having a micro-controller platform move to iPhone development and drop their compilerās interrupt extension. The relevance argument is that there are plenty of technologies from that same age that donāt have any connections to development today. Any technology thatās managed to stick around that long must have been pretty amazing when it first came out!
I understand some of the business cases that keep legacy products supported and how much time it can take to migrate once all of the systems assume a certain platform. But my focus on the new and shiny has always blinded me towards the many, many legacy technologies that are not just a common but often thriving platform. For every few developers working on building the next wave of technologies, there are many more with the burden of maintaining the technologies of past generations. All of that momentum from the last wave takes a very long time to die out, specifically if it has a commercial backing. Supporting infrastructure and platform technologies generally donāt go bust as fast as they boom, leaving a long tail of technologies on their way out that often have a much higher āwork shareā than the technologies that are still pushing for their first wave of adoption.
Delphi
If I had to pick a poster child for this, Object Pascal would cover all of the bases. Itās not a new ecosystem, but it still manages to hold onto some serious mind-share. My favorite is itās hype of RAD (Rapid Application Development). Today, this isnāt a common term for describing upcoming or recent technologies, but at one point in Delphiās life-cycle it must have been an important acronym to showcase. It originally meant that the language ecosystem has tools for building GUI applications. What a joke! Now anyone can write some bindings to a widget toolkit for iterative, GUI-driven development. The term has completely lost itās relevance as other ecosystems (mostly web) have advanced much further in that space, and now the term only serves to identify āenterpriseā or aging technologies.
As an aside, just the abbreviation led me down another hole of finding all of the silly three letter acronyms that were once so popular for every hot technology. Although I honestly canāt say that the absurdly named technologies today (thereās are databases named Rocks and Cockroach) have done any better at communicating their intent or application domain.
The āoutdatedā nature of the technologyās marketing has no impact on itās original or ongoing technical merits. Delphi hasnāt completely fallen out of favor or only survives for a very small niche. Itās re-branded itself as a cross-platform mobile development ecosystem and remains in the top 50 most popular languages by most rankings. Reading some of of the language recent features and tool chains, I couldnāt find any compelling arguments to use it over any other, newer platform for the exact tasks of GUI application development. It looks like Delphi has stuck around not on itās innovative feature releases and cutting edge tools, but on the consistency of itās developer base to solve common and ongoing problems with the knowledge they have from learning Pascal 20 years ago.
No one should start their first new project or business in Delphi today, but there are plenty of developers who will have to learn it so that they can maintain and enhance existing projects and then probably on their next project because they became so familiar with its strengths and weaknesses. Itās still a powerful language like many others that can still āget shit doneā. And thatās really the minimum that a language can offer to stick around.
Cold Tools
There are plenty of technologies like Pascal that I wouldnāt consider serious contenders for the best tools to solve modern problems. Most of these legacy tool-chains had a large user base from many decades ago when they were serious contenders or cutting edge. The developers or executives then chose to never move to a newer or better platform. Itās very disheartening to hear that many programmers are in this time warp where old technologies are still causing old problems in modern systems. This is the classic ālegacyā problem most developers have encountered. They know that their current tools are old and broken, but they donāt have other options.
Another aside, I read the MUMPS post on the Daily WTF after I started writing this, found on accident from a podcast arguing about the ādeath/stagnationā of Ruby. The Wikipedia talk page is hilarious. Itās clear that some readers went overboard to smear the language on an older version of the page, but then MUMPS developers attempt to post some defenses of the language! Itās one thing to understand and accept that youāre stuck using an inferior and antiquated technology and make the most of it, but itās another to attempt to trumpet the language as a modern or elegant solution in the face of vastly more well established alternatives.
Being held back by technology can have a massive detrimental impact on developers who donāt take the time to look up at what they could be missing (The blub problem). I recall a recent C++ presentation about what was supposed to be a hardcore debugging story and I was expecting to hear something like: āthe chip-set had a bug that only appeared while using the highest memory frequency and the CD-rom tray togetherā or āthe JIT compiler output bad optimization code for certain loopsā. But instead I heard that an application developer found and reported a strange rendering bug that affected some draw logic in a 1st party widget toolkit and then had to wait multiple years for a fix because the toolkit was closed source and poorly supported. :(
Anti-Hype
The anti-hype train just heads the other direction of the hype train, where developers are just expected to complain about these technologies for just being old, or being bad at something that no longer matters. This isnāt on the same track as the legacy train to nowhere, but sometimes they cross over.
Before ranting, know that I still respect the technologies (and their practitioners) for what they were and I know they were generally kept within reasonable bounds. I know that I'm not going to have to debug and enhance a web application written in Fortran, or that any recent flight control system written in Ada had to have been done with someone with 25 years experience.
But Iām always impressed when I hear about an old technology thatās still seriously kicking mostly because developers canāt pick alternatives without massive switching cost or because their part of the technology stack hasnāt moved as fast as the web development world. Mention or use of these languages or terms are generally red flags to me that the technology or user is far behind cutting edge in programming technologies for one reason or another.
Fortran
Oracle
Delphi & Pascal
Visual Basic 6
GWT
Perl
SOAP
MFC
Sourceforge
J#/J++/JScript
FoxPro
ActionScript & Flash
Corba
Solaris
Symbian
Itantium
Iām not listing just old or abandoned technologies, some of these are still industry giants, and others probably wonāt ever disappear completely even when there are much better tools for the job. Iām not even listing hate magnets like PHP or ObjC. These are the tools thatĀ āshouldā have beenĀ āreplacedā for new projects, there shouldnāt be a compelling technical reason to use these over something else, even if itās the same age with a worse feature set. The fact that itās better supported should be enough to justify phasing out these āknown deficientā technologies in favor of something that is at least more popular with a better chance at a future. Picking a popular technology at least gives some chance of a later migration, as you can stay in a safe herd for other newer technologies to cater to your migration pains. (again ala C to C++)
Relativity
On the other side of this hype, Iāve been talking to quite a few programmers who donāt follow all the stupid HN hype of the new technologies and found that they donāt have the same perspective as me of what is new and what is aging into irrelevance. Iāve heard that Lisp was āold and vileā orĀ āmath based and slowā. That Lisp was only used for āteaching the evolution of languages since thenā. Iāve heard how Visual Basic .Net is important and that itās āreally powerfulā in comparison to other languages. Iāve recently talked about Ruby on Rails multiple times because everyone wants to learn it as their first web development framework because itās āhotā and āeveryone is using it to use it so jobs are going to growā. My options and observations are completed opposed to all of the above. So every time something like that happens, it helps me understand how someone would suggest learning Pascal or Ada at this day in age on Quora with their real name. The definition of āgoodā and ābadā just arenāt widely defined for programming languages. Itās one thing to say āthis language is too conservative, weak dynamic typing helps me build fasterā or āThis system canāt have run-time errors or inefficiencyā, but itās another to say that one particularly flawed tool is worthwhile while others can be demonstrability superior.
There are plenty of old technologies that are still hot today as theyāve grown with their niche to spawn and support the cutting edges of technology in different ways. Out of use technologies can still be considered warm if they have descendants or significant influence on modern technologies. The technologies above are either generally recognized as dead ends (in some communities at least) or treated as important stepping stones that have now far outlived their original usefulness.
But even longer would be the list of technologies Iād consider hot or warm that havenāt had half the recorded adoption of any one of the legacy technologies listed above. My perspective is so warped towards the new that Iād see a small framework take much more mind-share than it actually has in comparison to a well established stack. This is the gap between the early adopters and the mass adoption. So many new and improved technologies are proposed that never make it to the gap and still more fail to make the jump into mainstream popularity. But once that jump has been made, itās near impossible to kill it. It will go on living long after support has ended and other tools are available that are 10x or more productive. Or even worse is that the jump forward was imaginary, and that the ānewerā technology is actually a step backwards for productivity!
The long tail of technologies says something about how future technological progress will unfold. Weāll reach a certain point where some of these dinosaur technologies will indeed go extinct while they are still in use behind the scenes. They will continue to drag down their associated domains until they can be replaced, sapping energy that could have been used to actually improve the application. And normally, by the time they get around to being replaced, they wonāt be replaced by a new or forward thinking technology for the same reason it took forever to replace it. The application will be moved to an equally well explored dead-end that has an even shorter lease on life than the last platform. Which will cause the problems of the application to repeat even faster!
This sort of technological burden, the whiplash from the explosion of system choice, wonāt have as noticeable effect as bridges collapsing from disrepair and outdated materials, but it will slow down future advancement as once trustworthy infrastructure takes more effort to maintain as itās pushed towards necessary goals that other technology has long surpassed. Iāve heard arguments that call for a Cambrian explosion of languages and tools that will hopefully provide an evolutionary path out of this repetitive mess, but if done incorrectly this sort of effort could lead instead to a very painful mass extinction!
The topic of legacy code is massive. Even trying to condense a single question of āwhyā, āhowā, or āwhatā becomes a complex multi-page post!
Every technology eventually leaves a legacy, but where it gets on that train and how far it runs is a much more complicated function of developer preferences and happenstance. The problem with using any technology is that all technology keeps moving. As soon as you put a foot down to do something with the tools of today, the world will start passing you by. Youāll either need to run with the updates to keep up, push the cutting edge yourself, or hope that when the platform slows down it sticks around log enough where you donāt need to worry too much about catching up!
How-to: Function overloading by return type? #computers #dev #programming
How-to: Function overloading by return type? #computers #devĀ #programming
Function overloading by return type?
Why donāt more mainstream statically typed languages support function/method overloading by return type? I canāt think of any that do. It seems no less useful or reasonable than supporting overload by parameter type. How come itās so much less popular?
Answer [by Greg Hewgill]: Function overloading by return type?
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
ā Live Streamingā Interactive Chatā Private Showsā HD Qualityā Free Actions
Free to watch ⢠No registration required ⢠HD streaming
Fixed: Best explanation for languages without null #computers #development #fix
Fixed: Best explanation for languages without null #computers #developmentĀ #fix
Best explanation for languages without null
Every so often when programmers are complaining about null errors/exceptions someone asks what we do without null.
I have some basic idea of the coolness of option types, but I donāt have the knowledge or languages skill to best express it. What is a greatexplanation of the following written in a way approachable to the average programmer that we couldā¦
Fixed What are important languages to learn to understand different approaches and concepts? #dev #it #asnwer
Fixed What are important languages to learn to understand different approaches and concepts? #dev #itĀ #asnwer
What are important languages to learn to understand different approaches and concepts?
When all you have is a pair of bolt cutters and a bottle of vodka, everything looks like the lock on the door of Wolf Blitzerās boathouse. (Replace that with a hammer and a nail if you donāt read xkcd)
I currently program Clojure, Python, Java and PHP, so I am familiar with the C and LISP syntax as well as theā¦