|
||||
|
Node.js and the Regressing Web28-Feb-2012 After hours of working with Node.js, reading tutorials, posts, and other articles on Node.js and other JavaScript-driven web-servers (SilkJS) I am compelled to speak-out against what is quite clearly and objectively a movement backwards in web technology for reasons that you may find surprising.Firstly it's not actually a bad idea to use a server-side scripting technology built on-top of JavaScript. And though I would prefer to use Python, server-side JavaScript has its advantages. However, the problem that Node.js intends to solve is better addressed by languages such as Python. Here are the problems with Node.js and why you should steer clear of it at least until it has a few years to mature: It Replaces Mature Web Servers Node.js and SilkJS are examples of technologies that intend to replace web servers altogether. The rationale here is to throw away years of mature technology from a variety of vendors (IBM, Apache, Microsoft) and replace it with one singular immature technology that operates on a completely different paradigm (CPS). These other vendors have had years of experience and large development teams patching holes and polishing rough edges in server technology whereas Node.js and SilkJS have neither. It is inevitable that Node.js and SilkJS are riddled with holes, which leads to my next point. The Environment is Buggy In Node.js, the tertiary operator (expression ? result1 : result2) is broken. In my own source code I had to work-around this issue using an if/else statement instead. Will the developers repair this problem? most likely, but how many more unpleasant surprises will a developer encounter? is it worth risking the potential impact this will have on end-users? A Single-Threaded Web-Server Makes No Sense Node.js intends to not only replace other web-servers but it also insists on running in a single thread. The sole reasoning behind this: to make the developer's life easy (and the end user's life more difficult). This is an extremely poor justification. A single threaded web-server does not take advantage of multi-processor server hardware and cannot hold a candle to mature web servers that do. So while Joe fanboy brags to his buddies about his awesome codebase his end-users are staring at an hourglass / spinner wishing they were golfing. Apparently Node.js in particular is coming-up with solutions to this problem, but I want to make something very clear about this. This is reactive bottom-up design that will inevitably lead to a mess. Only a top-down well-thought-out and well-designed solution (preferably before a single line of code is even written) can lead to a product that any serious enterprise can trust and rely upon. More Reliance on Computers, Less Reliance on Brains This is the most important reason why Node.js and similar technologies are wrong. No computer is a good substitute for a well-trained mind. This is a general problem of attitude towards technology and leads to a mediocre solution content to off-load more processing to the end-user. Developers that insist on making the computer do more thinking rather than doing his own thinking are using advancements in computing technology like a crutch instead of the gift it is meant to be, vis a vis mediocre solutions. This error is objectively manifest in opting for technologies with a low barrier to entry (JavaScript) than taking the time and energy to invest in a proper mature web-technology (e.g. JavaEE / ASP.NET). This benefits the developer, not the end-user. Actually, learning a proper mature web-technology is better for the developer too in the long-run. I suppose throw-away web-applications written using Node.js makes some sense, but that gets expensive pretty quick. Why JavaScript? The reasoning behind using JavaScript for a server-backend is two-fold: Firstly, it makes sense to build a solution end-to-end in one language. This isn't necessarily true. As a developer with exposure and experience with multiple languages I feel no qualms about architecting solutions with heterogeneous technologies. In fact, it's smarter and I want to do it more often. The battle-hardened developer knows that different languages are suited to different problems and knows how to apply them in an efficient manner that actually saves him more time in the long-run. C++ is important for both performance and scalability, Haskel is important for writing mathematical algorithms, Python is important for scripting and automation. A developer who insists on using JavaScript for everything is like a contractor who insists on building a house with nothing more than a screwdriver. It makes very little sense when you factor-in the big picture. Furthermore JavaScript was never intended for this purpose. It is a non-modular scripting language lacking proper object-oriented programming support. Writing web applications in batch files would be comparable--well at least with batch files you have some degree of modularity--the end result is a mess of completely unmaintainable code. "It's Not PHP" The justification for using JavaScript is because "it is not PHP." Proponents of Node.js and SilkJS tip their hands to demonstrate their own ignorance of the wide variety of server-platforms available for building web-applications by positing that PHP is the only one available. So apparently ASP, C#, ColdFusion, ISAPI, CGI, Python, JavaEE, Ruby simply don't exist. There is no excuse to not learn how to use these other platforms, so why don't devs do that? Simply because reinventing the wheel is simply more fun. I'm sure I've missed a few bazillion other web-technologies, and a question that haunts me in my sleep is often, "What technology am I unaware of that could make my application run better for my customers and bolster the bottom-line?" I don't think Node.js developers think in these terms. I get the strong impression these guys are more worried about going home early or hitting the slopes. I like hitting the slopes too mind you, whether on my board or on skis. Continuation-Passing Style is no Substitute for Parallel Computing This is how a developer writes software to run under Node.js. It is a very old approach to functional programming and makes the source code look absolutely horrid. LISP would be a better choice for CPS over JavaScript, but then this requires knowledge and experience with a variety of programming languages (see my previous point). I think CPS is a good idea to help mitigate risk of programmer error in concurrent programming, but the justifications are backwards. CPS should not necessitate the use of JavaScript, do it properly and choose the best CPS language for the job. "Node.js will kill Apache" Yes the Node fanboys actually say this. So the true motivation behind Node.js isn't so much coming from a desire to improve the web, it looks like it's motivated by a kind of malevolent socially autistic mandate to dominate it with one language and one technology. That will never happen. In Conclusion I do not support Node.js or SilkJS or any other server-side technology that insists on using JavaScript to solve absolutely everything. Proponents of these technologies fail to provide sufficient reason to walk away from the alternatives. I could discuss more reasons not to use these technologies (e.g. difficulty debugging) but I've said more than enough. Mars Tycoon, The "Sandbox World" Strategy Game09-Jun-2011 extollIT Enterprises is developing a new kind of innovative video game. We call this genre the Sandbox World game. There are three other games I know of that are similar to our concept, but only one can be credited with its inspiration:
If you haven't heard of these games, I suggest trying Minecraft or Roblox. Dwarf Fortress has inspired Mars Tycoon, but it is very difficult to get into if you are a novice gamer. Our small team of three has been developing this game since the fall of 2008. You are a space-pioneer in the year 2492 and desire to escape the chaotic political climate of Earth to investigate a strange new mineral on Mars (and beyond) first discovered on a small asteroid that impacted Earth. Scientists have dubbed it with the name Loganite and although it's chemical signature has long been familiar to scientists it has never been found in nature let alone in vast quantities. Loganite has significant commercial value as a nuclear fuel as well as having other peculiar benefits. Scientists are only just beginning to discover Loganite's value to mankind. Your job is to establish a mining base on Mars, extract the Loganite, and compete against other nations scrambling for the mineral. You will have to defend your mining base from saboteurs, natural disasters, and skirmish attacks. Launch of Mars Tycoon is scheduled for 2015. If you posses any of the following skills / experience / knowledge and would be interested in joining our team, please contact us using the About -> Contact Us menu at the top of the page:
"Wait a sec! These are pretty steep qualifications!" Actually not really. Although some of these "qualifications" demand post-doctoral work, you don't even need to have a post-secondary degree here. Self-directed study is very acceptable. For example, we are interested in people with Chemical Engineering knowledge to help us design a realistic Asimovian Sci-Fi experience. We have a rich and comprehensive vision for Mars Tycoon in terms of both storyline and gameplay mechanics, so Mars Tycoon will be an introductory game into this universe. If it is successful, we plan to release sequels and prequels each sporting both an expanded storyline and new gameplay mechanics. Computing Arc-Length of a Spline - Advanced15-Jan-2010 Here is a snippet of my own software used in another project that computes the arc-length of a spline using the Gauss-Legendre quadrature (numeric method of integration) implemented with recursive template meta-programming in C++:First-off, you will need a constant 5x2 array of doubles to initialize the abscissae for, which is essentially a pre-computed table of the roots of the Legendre polynomials of order n. In this example I use order of 5, which was accurate enough for my purposes: const double ABSCISSAE_5[5][2] = { Stub out an exception to generate runtime errors when incorrectly implementing the class: class CalcEx : public std::exception {}; Below the recursive class template is defined. It uses template-inheritance and since templates are interface-agnostic, you will need to define this method on your class: inline real f (const real t) const. It's essentially providing the implementation for an abstract method declared in the base class. template <typename T, typename Derived, int NN> Now it's time to put our algorithm to use and build a class that takes a spline object (usually four points or two points and two tangents) and computes the arc-length using the Gauss-Legendre algorithm we've prepared: template <typename Spline, typename real> The spline object assumes a function called computeAt that returns a vector (2D, 3D or whatever) of which the function MAGNITUDE computes the vector magnitude of. You will define these yourself including your implementation of splines. There are plenty of examples on the Internet on how to implement splines. Some examples include Cubic B-Splines, Catmull-Rom Splines, and NURBS. Emerging Cultural Acceptance of Video Games21-Jul-2009 For decades now, video games have been evolving. And they are still evolving; the fat lady hasn't sung. One of the key things happening here is that video games are still searching for its primary role in society. Video games have proven themselves both financially and artistically, but still needs to gain cultural and social respect. Right now video games are experiencing the honeymoon of money-making and about to experience the hang-over as game development costs soar into the millions. We can't respect video games as a medium of communication making positive contributions to society. Games like Grand Theft Auto don't do much to instill confidence in moms and dads. Video games have earned a very tainted track record. It's no surprise why society rejects this medium.Games like Grand Theft Auto or World of Warcraft are just the sort of games that sell and pay the bills. Beneficial and "socially acceptable" games employ realistic, and therefore unpopular, consequences; it's not easy to win, and you're not always the over-powered hero that traditional video games make you out to be. There are some positive side-effects to playing a game like World of Warcraft, but in general very little of the experience translates to the real world and so in terms of time the cost outweighs the benefit. When money is on the line, there is a strong voice that rejects any titles that do not elicit violence, hyper-sexualization, or ape-man thinking, a voice that the industry caters to almost exclusively. Let's get our minds off this one-track approach to games. And let's also do away with partisan anti-gaming rants using Doom or Wolfenstein 3D as examples. For one thing those games are ancient! get with the times! secondly, could they say the same about Sim City or The Sims? Yes, making my sim call-up a blind date will cause me to bring grenades to school on monday. I see the connection, no really. Setting aside trigger-happy gaming for a moment, the Wii has managed to appeal to baby boomers and has advanced cultural and social acceptance of interactive entertainment more than anything else has in decades. People of all ages enjoy playing Wii fit, it's fun, and it stretches those creaky joints. The Sims, Civilization, Sim City, and other relatively tame simulation and strategy games are in-fact the best-selling PC games (2007 ESA survey). Guitar Hero fans have picked-up a real instrument with either aspirations of stardom or casual enjoyment. Simulation-type games have been used to help unemployed people learn about various industries and the results have been very effective in helping them find jobs they enjoy. We seldom hear about these, and even these barely scratch the surface of interactive media potential. There is woefully little serious video game research being conducted. We just simply haven't discovered what games are capable of. We just don't know. There are some obvious facts: games are serious having the capacity to enslave the mind, but so do a myriad of other things, but we don't throw them out as altogether innately evil. They must be treated with care but not necessarily rejected just as a credit card with no limit must be treated the same. Video game addiction is not psychotropic drug addiction, there are no chemicals involved other than entirely natural dopamine produced by the brain. It is not enough to simply blame video games and be done with it just as so many people need a devil to blame their problems on. The individual has complete control here. The gamer needs a little self-discipline with this powerful medium and learn to use it instead of allowing himself to become used by it. And consider this: what's to prevent a young gamer from escaping to video games to cope with confused and detached parents fearful about him playing video games? There is some research and evidence in support of video games. They stimulate neural growth especially at young ages. They foster complex problem solving skills, quicken reflexes and hand-eye coordination. Better hand-eye coordination can lead to increased enjoyment of playing sports contrary to the popular belief that video games lead to a sedentary lifestyle. This 2005 survey of 200~ college students indicates that video games are forging very capable and competent leaders able to think outside the box and tackle problems aggressively and proactively. One caveat: it alters one's way of thinking that is unpopular with educators and not very compatible with traditional methods of education. Consequently gamers typically have lower grades than non-gamers. Overall there is strong evidence that playing video games can have a very positive impact on the individual. If you have a problem with gaming then here's an invitation for you to get acquainted. Pick-up a game and discipline yourself to play it everyday for one week. During this exercise focus on wrapping your head around how a typical gamer thinks. If you understand how gamers think, you will better know how to help them see things from your point of view. Otherwise without having a clear and balanced perspective, one will only contribute to the frustration and confusion. Eventually gamers will out-number non-gamers and we will see gamers, who are socially responsible and lead balanced lifestyles, move into positions of power. Eventually we will figure out what this interactive medium is capable of and learn all about the human relationship with interactive media. Innovation 101 for the Perfectionist30-Jun-2009 To innovate is to introduce something new to the public that is usable and meets a perceived need. This article will dispel some common misconceptions that the perfectionist may have with his approach to design. Since women are perfect anyway and have this area covered, I will only use masculine pronouns. Actually it's for the sake of brevity. As someone who IS a perfectionist, this article is written for other perfectionists just getting his or her feet wet with this stuff. I suppose you could say that a perfect design goes hand-in-hand with proven innovation. But as the perfectionist I cannot say I've always shared this perspective and it's difficult to get over it. Hopefully this article can dispel some of the myths holding the typical perfectionist back from greater success.MYTH: Perfection in design is necessary. The fundamental reason perfectionism fails as a good approach to software design is because perfectionism does not factor human error into code design. Human error is inevitable and "nobody's perfect". To expect consistent and perpetual perfection from yourself, your team, or even your customer's requirements is unrealistic. Therefore, the perfectionist must accept human error as a valid and acceptable factor in the design process. It is haphazard to turn a blind-eye to this variable. Expect loose-ends to come from anywhere. Probably the most dangerous assumption to make is that the customer has a good understanding of his or her business challenge. In the end trial and error is inevitable to evolve and refine a product. MYTH: Perfectly designed software leads to a quality product How do you measure the quality of a product? Simply by how accurately it accomplishes its original purpose, which is defined by the customer's requirements. But how often are those requirements written in stone? How often can we say that they everyone understands those requirements perfectly? The perfectionist operates with these assumptions. Furthermore, it takes too long to develop a product that is perfect. Since software requirements change quite frequently, the result can be a lot of wasted time on a polished but irrelevant design. If you can't get it out the door, if it's incomplete, then it is far from perfect. One key characteristic shared by all of the most successful products out there is that they each do exactly one thing very very well and that has been attained through multiple iterations of trial and error. MYTH: A perfectly designed product is highly maintainable. Since details of implementation are often up to one individual programmer, his perception of perfection may be way-off the mark to someone else. Furthermore, code that conforms to standard OO design patterns religiously is not maintainable because it proves to be an overwhelming task to trace program flow through a deluge of, however highly cohesive and decoupled, unfamiliar classes. An experienced developer knows that any algorithm that can fit conveniently into various design patterns is common-place and more than likely already in a reusable framework somewhere anyhow. For the rest of your intellectual property, you yourself know that it doesn't fit conveniently into standard design patterns. Moreover, you know that your product isn't innovative because it is common-place. And so it becomes necessary to bend the rules while ironically keeping in mind other developers who might have to look at it later. |
|||
| Home | Contact | About | Services | Products | Clientele | Portfolio | | ||||