4 ms·
As someone who grew up as a programmer with assembly language, C, and C++, learning the good practices needed to make a 1 million lines of code C++ application
by jng 14y ago
As someone who grew up as a programmer with assembly language, C, and C++, learning the good practices needed to make a 1 million lines of code C++ application work and be maintainable:
I've been equally disgusted by the evolution of programming in the last few years. HTML - which is, to a first approximation, always invalid. JS - which needs jQuery to make it mostly-but-not-completely cross-compatible among browsers. CSS, which hides so many hacks on top of each other, and which even needs a reset to be compatible. And now - distributed systems with pieces in PHP, Python, Objective C, Dalvik-Java, etc... and sustained by awesome-but-hackish fixes like Varnish and FastCGI and Nginx. where everything seems to be put togetther with duct tape.
But I'm slowly getting to the next stage, and having to admit - no, actually, admitting - that if it's spread like fire, there must be something to it, no matter if it hurts our taste so much.
And if you look well into it, it's very similar to biological evolution. Our own genetic codes and body plans are full of ancient pieces that are not needed any more (or at all, male nipples anyone), but it seems that it was more economical to "patch" things than to fix things properly. Or at least, it didn't hinder the current designs enough that they wouldn't succeed over the alternatives evolution probably also tried.
And now Google translates text statistically, without even trying to understand things.
One fear I have is that we will be able to create a working AI in a few years... and due to the way we do it, we may even not understand how it works.
- lerouxb 14y agoNitpick: jQuery exists to make the HTML DOM manageable, not JavaScipt the language. (There are libraries targeted at javascript the language, but you could make an argument that that's the point of all libraries for all languages...) I find jQuery more analogous to tools like configure and autoconf. (in that they aren't actually needed for "modern", standards compliant browsers.) As an example: there are already many lightweight drop-in replacements that assume a sane browser to begin with. CSS is remarkably hack-free and the resets are just to remove the default styling that browsers have built in. Obviously browsers need builtin styles otherwise all the old pre-css pages would stop working. And why are you calling programming languages and web servers hackish? How is nginx hackish and apache not? How is Objective C hackish and C++ not? Why stop inventing new languages at assembly, c or c++? Other than that I generally agree with the rest of your comment. I think if we ever get to some kind of technological singularity we'll almost certainly and just about by definition not understand how it works. And true/strong AI would definitely be a singularity. Even if we understood version 1 we would likely not be able to understand whatever it dreams up 5 seconds after we overclock it. And we will - moor's law and all that. ;)
- jng 14y agoI don't mean Nginx or Varnish are more hackish themselves than Apache. I could have said Apache instead of Nginx, but I think Back in the day, a "serious" application usually involved a large amount of quite homogeneous source code in a single language (or 2 or 3 different languages for different tasks: C/C++ for the main code/engine/logic, assembly for performance-sensitive code, and maybe some custom high-level script for high-level application logic). This was built usually on a single machine with a single build script, and resulted in some binary which could be deployed. Even early web apps were more akin to this model - Java apps, or even Perl apps. Nowadays, an "app" lives distributed among dozens of servers and client types. People describe what they have: "12 memcaches, 5 varnishes, 8 nginxes, 5 app servers with Ruby, 4 static content servers, and a MySQL master server with a fallback master and 5 slaves for reads. Separately, an Android app, an iPhone app and an HTML5 front-end." These systems started as a single app in a single box, and have "grown" for scalability, reliability and security, being patched up with different pieces of technology put together with often unreliable methods but fallback mechanisms that make it more resilient that if reliable methods were used but no fallback. It's not so important nowadays that the application code be clean, elegant, or failproof, but that measures are put in place so that the service will keep chugging along most of the time. And setting up the whole system from scratch involves a manual with probably hundreds of steps putting together haphazard technologies, installing different types of Linuxes and packages for each piece. And may even involve difficult-to-replicate steps, such as using an AMI to launch EC2 instances, where the engineer that created the original AMI doesn't even work here any more and recreating it from scratch would involve 20 packages, Googling for 5 of them as they're not available in normal repositories, 5 manual patches, two secret incantations and a tribal dance around the chair while singing and praying to arcane gods of long-forgotten package managers. {{Side-note: although it's not the main point, I'd definitely say Objective C is more hackish than C++. C++ has its own amount of weird stuff due to being built on top of C and its evolution with templates, etc... but the evolution of Objective C is done much more in the form of "patches". Even the original syntax takes advantage of awkward gaps in the syntax of C (@interface, @implementation, #import, [object msg:param]?). But it's even worse how new features are piled on top of old ones: properties, ARC 2.0, etc... it's distinctly noticeable when you just wouldn't feel comfortable teaching programmers new to Objective C how to use ARC, without learning the underlying memory management model first. In C++, people can learn "new" and "delete", and never hear about malloc()/free(), and there's no problem at all. Anyway, my point about hackishness was not referred to ObjC, but to how whole systems are engineered nowadays.}}
- heretohelp 14y ago>And now Google translates text statistically, without even trying to understand things. This comment seems to mostly be, "I'm going to complain about software disciplines and lines of CS research that I don't understand because their practical approaches don't conform to my finicky aesthetics." If you want to formulate Strong AI to solve NLP as a problem, go for it. The rest of us are happy to use Google as it is.