The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I find it really expressive to work in, and you can do things with tools such as Dojo and Closure these days that make it easier to build more structured apps.
Like most scripting languages, though, the potential for misuse is alarming. It takes a lot of discipline to write anything approaching a full-blown application that isn't a total mess.
Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. In the face of ambiguity, refuse the temptation to guess.
In my case it's not only because it's a scripting language. Scripting languages tend to be sloppy with datatypes and I don't want to write any kind of logic with such a language. It's far better when you can keep all eggs in one basket by using the same programming language on both the server and the client side.
Besides that, it's also a wolf in a sheep's pelt. It tries to look like something out of the C family, actually it is something more akin to Lisp. And if there is one thing I was tortured with by various eggheads then it's Lisp.
Syntax-wise, if I had to choose between programming in PHP and programming in JS, I'd choose JS any day - if only because its implementation of various language features such as variable declaration, scoping, and closures is far better. JS is a pretty decent scripting language, but there are plenty of better ones - Python comes to mind - and I prefer a static-by-default language that allows for dynamic programming and has highly flexible constructs (C#).
The fact that libraries like jQuery and d3 can be written in JS without too much hackery shows that it has plenty of mojo left in it. But I don't think I'd ever deliberately choose to write serious server-side code in it if I had all my options available, and it'd be cool if there were more client-side options available as well in the browser (companies like Google are working towards that).
I go for a native client whereever possible. There I have free choice of the UI I want to use, get to use the client computer's resources, the presentation logic sits completely on the client side and I usually can write the client with the same language (C#) as I used for the server side.
And then there also is the part about web applications that use more extensive resources. Sending more or less everything at each page request is wasteful. Sending complete applications and their resources to run them in a browser is also wasteful. Downloading a client and updating it once in a while is far less of an act.
With the advent of "apps" with granular security permissions and better distribution channels, there are more cases where native clients are fully feasible too. However, on the other side of things, HTML 5 is heading towards the same goal with offline application caches (in addition to the existing browser caching features). Of course that doesn't address code reuse, or the fact that interpreted languages (like JS) are inherently many times less efficient than compiled or JIT-compiled code.
C# is a pretty awesome language for writing stuff in, no matter what you're doing - most of the efficiency of native code but much of the flexibility of a scripting language, implementations on a wide variety of platforms including mobile, one of the most well-rounded featuresets of any language, and great developer tools. And, you can even use it on Google's Native Client[^] - Bastion[^] is a game written in Mono for NaCI.
- Try to write client/server applications using a stateless protocol (http)
- Introduce application states on top of the stateless protocol (session or the ASP.Net viewstate) which are easily disrupted by using the browser's navigation buttons
I prefer to throw the browser away for web applications. A client program and a webservice usually can do the same job even better than webpages. This way I can
- Just forget about JS (and related horrors) and HTML (and related horrors)
- Develop and debug server components and the client in one(!) programming language, one environment and in one project folder
- Use whatever UI and design philosphy I like and usually getting a far richer and responsive UI than webpages can provide
- Let the client hold the application's state, using the client machine's resources and memory
- Communicate to the server indeed in a stateless fashion
I speak Dutch/Flemish, English, and French, with notions of German and Spanish; a classic background (Latin, ancient Greek), and some linguistic interest, tells me most of it comes together at some point.
Luc Pattyn [My Articles] Nil Volentibus Arduum Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
I am honestly impressed by your abilities with the English language, for someone who grew up in a french speaking environment ( wild guess while looking at your first name, correct me if the assumption is wrong). You even solved many CCCs
Ok, that explains a lot. BTW, I was in Antwerp a few weeks ago. My BIL works and lives in Brussel, so when we go and visit him, we also visit some other belgian towns. The harbor is impressive, it really is. The last trip we made was to celebrate new year's eve. On the day before, we went to Oostende and Brugge. The kids enjoyed the beach and we enjoyed the towncenter of Brugge.
I watched episode 3[^] last night and I was a very good bunny and switched off when it finished rather then watching 'just one more'
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DDEthel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
Albatross (or double eagle as Americans insist upon calling it)
F***ing idiots. An Eagle is 2 under, a double Eagle would be 2 x 2 under making 4 under while an Albatross is 3 under.
So from now under 4 under is called an Elephant, take note you stuipid Americans it goes as follows -
1 Under - Birdie 2 Under - Eagle 3 Under - Albatross (not a f***ing Double Eagle, stupid c***s) 4 Under - Elephant
Michael Martin Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible." - Mr.Prakash One Fine Saturday. 24/04/2004