|
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
1) Decouple vanilla JavaScript from DOM JavaScript
2) Write unit tests
3) Repeat
|
|
|
|
|
Camilo Reyes wrote: Decouple vanilla JavaScript from DOM JavaScript
I can't even think of how to do that without classes, events, data binding, etc. anymore. I guess that's why there's all those frameworks like Backbone, none of which I've ever experienced a "wow, this is a great solution." Seems like they're all band-aids sitting on top of a bad language.
Marc
|
|
|
|
|
Of course! The mindset of the frameworks is: "JavaScript sucks! So MOAR JavaScript." Is this not ironic? Vanilla JS is a complete paradigm shift. When you write C#, would you write it like you write Python? A good craftsman never blames the tool.
|
|
|
|
|
Because it's JavaScript, where this is never that, your string is actually a boolean, and array plus object is certainly not a number
|
|
|
|
|
JavaScript, like any other language, is what you make of it. There's nothing saying you can't do what you just did in your own programs to abstract logic. It's perfectly valid. Cheer up bro, you're not shaking hands with the devil until you start using Ruby.
Anyway, where I see that JavaScript has failed miserably is allowing for things like modular development, but it was a language for the web and thus never to be compiled into a single executable. And web requests are expensive, so having 1000 modules to load an app / webpage was never feasible since it would be asking a web server for 1001 requests per page.
But times have changed, especially with Node. There's nothing saying you can't write a well-written app in it, with all your bells and whistsles. The only difference being, you have to get things running manually, there is no JS bells and whistles preprocessor / add-on out of the box type thing. Maybe TypeScript in VS, but most things you have to just know about it to implement it.
Jeremy Falcon
|
|
|
|
|
For me, it's a "fit for purpose" thing.
I see js as being for "disposable" pages (which is what a fair proportion of the Interwebs comprise), and it's absolutely perfect for that, because all you need is either a quick "copy & paste and get the page up" solution, or a page template that already contains the required routines, so you don't even have to copy & paste anything.
If you then want to set up a page that governs those pages, it's simple, quick, and up on the web before your second coffee. No coding standards, no databases, and no time at all "wasted" in getting the product (the content of the pages) to the customer (the web-surfer).
A professional site for a business, however, needs content management, document management, library-based code injection, and at least one database -- it's no longer "pages"; it's now a program/application, which most certainly does need more than js can offer.
However, even professional sites contain a lot of "pages", which don't need all the froufrou, so why waste twelve hours of a developer's time on what can be called "infrastructure work", when all he really needs to do is C & P & tweak a bit of js to get the content up on the site, where the customer can access it?
Not everything needs to be wrapped in swaddling, carefully bandaged, then clad in perfectly-welded iron. Some things just need to be available to the customer.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: it's no longer "pages"; it's now a program/application, which most certainly does need more than js can offer.
Yup.
Mark_Wallace wrote: However, even professional sites contain a lot of "pages", which don't need all the froufrou,
Quite true. Unfortunately, the web apps I've been developing are anything but froufrou, I can't think of a single page (except the About page) that doesn't have AJAX calls, event triggers, and data binding of some sort.
Marc
|
|
|
|
|
Then js shouldn't be used at all, because it's not fit-for-purpose for such things.
Try to get this idea through to the people who make decisions about what to use.
Put it in a way that makes it understandable -- e.g. tell them that they don't want their trousers made out of the same material as their shirts, even though they wear both.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: Put it in a way that makes it understandable -- e.g. tell them that they don't want their trousers made out of the same material as their shirts, even though they wear both.
I'm not sure what you're getting on about; but I find cotton athletic shorts made from the same sort of fabric as the t-shirts I wear in my free time much more comfortable than the dressier pants I need to wear to work.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Pic or...
... On second thought, kindly disregard this posting.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Shadows . . . they paint the sunshine.
Why Not Enjoy The Weekend !
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
And you learnt your physics where exactly?
I am not a number. I am a ... no, wait!
|
|
|
|
|
Software Zen: delete this;
|
|
|
|
|
W∴ Balboos wrote: Shadows . . . they paint the sunshine.
Yes, they do. Enjoy your weekend, as well.
|
|
|
|
|
Quote: Shadows With Cliff Richard on vocals?
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Anybody else like the HBO series Silicon Valley? Silicon Valley (TV series) - Wikipedia, the free encyclopedia[^]
The missus started recording it for me a few weeks ago, but I only got around to watching the last 3 episodes last night and found it to be quite amusing...for a show about a bunch of geeks and a software company!
"Go forth into the source" - Neal Morse
|
|
|
|
|
I started watching "The IT Crowd[^]" on Netflix (it does stream). Funny show. I'll have to check out Silicon Valley.
Hogan
|
|
|
|
|
There were a few mentions of 'The IT Crowd' being a good watch...now on my list. Thanks.
"Go forth into the source" - Neal Morse
|
|
|
|
|
I haven't seen it, but I bet it's not as good as The IT Crowd[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
I implemented a HaltAndCatchFire function in C once.
The hardware had a PSU controlled by a Microchip uProcessor (one of the eight leg jobbies) which selected the right transformer coils in order to work on an massive range of mains voltages - IIRC 60VAC to 300VAC.
And we had problems with a distributor who had a habit of buying a few machines, then never buying any more - but producing his own.
So...the software had a large number of checks built into it to make sure that it was legal, and the hardware was right. If it wasn't...it instructed the uP to switch the transformer to Seriously Stupid Voltages and burn the heck out of the PCB. HCF. Sorted.
Unfortunately, the PSU was changed to a switch-mode, and I lost the ability to have the software commit hari-kari...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Now that's what's called unforgiving QA.
/ravi
|
|
|
|
|
If you like Mike Judge's other stuff (Office Space, Idiocracy, etc), you'll like Silicon Valley. It's that kind of humor.
|
|
|
|
|
I enjoy it.
Jeremy Falcon
|
|
|
|