MacBook, defective by design banner

title:
Put the knife down and take a green herb, dude.


descrip:

One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com

Using 89% of the same design the blog had in 2001.

FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white.

As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green.

x

MarkUpDown is the best Markdown editor for professionals on Windows 10.

It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support.

Features you won't find anywhere else include...

You've wasted more than $15 of your time looking for a great Markdown editor.

Stop looking. MarkUpDown is the app you're looking for.

Learn more or head over to the 'Store now!

Friday, May 05, 2017

JavaScript transpilation is a neat trick, but in practice you may seem to simply trade one multifaceted, shifting platform -- what works crossbrowser -- for another -- here, a set of constantly changing hipster libraries.

There are simple solutions to the shifting , each with one major flaw:

  • Target a "lowest common denominator" or "limiting reagent" browser (ie, IE[x]) with "native" JavaScript.
    • This stinks because even IE11's tools are much worse than Chrome's DevTools.
    • Yet if you don't live in your "worst" browser, you're going to miss issues. No, you are. Every time.
  • Pick one set of transpiled technologies & practices, and, within reason, stop.
    • You're still going to have to test in browsers
    • You'll still be responsible for debugging third-party code.
    • You'll disappoint your hipster programmers.

Interpreted incorrectly, transpilation gives the impression that you're developing for an environment like a server: a controlled, homogenous system. You're not. It's not node. And I've yet to see a practical advantage beyond very specific, situated uses -- JSX compilation for React, for example -- provided transpilation. It's all still very familiar zeroes and ones.

Labels: , , ,


posted by ruffin at 5/05/2017 09:48:00 AM
Monday, February 20, 2017

From Jslint Is Not A Code Quality Tool For 3rd Party Code โ€“ Hugh FD Jackson:

Crockford is an opinionated, experienced and charismatic guy. As such people often do, he has gained significant influence. In this post, Iโ€™m going to focus on what Crockford thinks the role of JSLint is, as typified by this suggestion:

โ€œThere is one reliable, objective metric of JavaScript code quality that can help you in making your choice [โ€ฆ of library โ€ฆ]: JSLint. If JSLint finds problems in a library, then dump it and move on to the next one.โ€

I firmly believe that this attitude is damaging; and worth focusing on given his potential influence.

Yeah, wow, no. That is bad advice.

As I've said on Stack Overflow before:

As a rule, you should exempt 3rd party libraries from your linting. There's nothing you can do about external libraries unless you want to fork them and lint them yourself, which is, well, insane. ;^) And, again, minified code often takes shortcuts that aren't lint-friendly.

Lint your code before you minify to keep its quality high, but don't worry about QAing libraries you shouldn't be touching anyhow. Assume they have another method for ensuring high quality, which might include using a different linter, or a linter with a different set of rules.

I'm a huge fan of linting your JavaScript code, and there's no more thorough linter for less investment on your part than JSLint. Nothing it forces you do is objectively wrong, and you don't have to worry about getting everyone in a room to set up an ESLint rule set before you get started.

But there's absolutely no reason not to use libraries that aren't themselves lintable in their original. There's a clear interface between you and that code. It's sort of like how RMS wishes you wouldn't use any non-GNU code. A proscription from using non-JSLinted libs is more political than rational.

Labels: , , , ,


posted by ruffin at 2/20/2017 08:42:00 AM
Tuesday, May 01, 2012

Hilarious "exchange", though that's being kind, on github regarding JSLint. I could copy and paste, but it's required reading in the original. I'll highlight two bits with images for you "TL:DR or click"-ers.



So kittteh sayz "Can I politely ask for cheezeburger".

... I get an additional error stating Unexpected space before '['.

The only way to get rid of this error is to format the script like this, which I think make it more unreadable:

var showOrHide = 'show';
jQuery('.selector')
 .removeAttr('style')[showOrHide]();

So my question is would it be possible to make the second example not produce an error?

Thanks :)


Mr. Crockford responds: NO WAY KITTEH!!!


When this happens to me, I get a little flush. What thah...? I mean, engage the asker, right? Why the draconian SLAM? He's not asking if it's, in your royal opinion, The Right Thing to do. He's asking, nicely, if you wouldn't mind him doing This Wrong Thing briefly.

When someone is asking respectfully, likely represent a problem experienced by more users than themselves, what's the right move? Well, wrong is, "NO KITTEH, THAT'S MY POT PIE!" I mean, it's fair game to say, "I get your meaning, but, at least subjectively, I'd like to encourage different behavior." Macro it. It's nicer.

Thank you to Cartmans around the world for your pleasant conversation, even when you're right. ;^)

Labels: , ,


posted by ruffin at 5/01/2012 10:56:00 AM

<< Older | Newer >>


Support freedom
All posts can be accessed here:


Just the last year o' posts:

URLs I want to remember:
* Atari 2600 programming on your Mac
* joel on software (tip pt)
* Professional links: resume, github, paltry StackOverflow * Regular Expression Introduction (copy)
* The hex editor whose name I forget
* JSONLint to pretty-ify JSON
* Using CommonDialog in VB 6 * Free zip utils
* git repo mapped drive setup * Regex Tester
* Read the bits about the zone * Find column in sql server db by name
* Giant ASCII Textifier in Stick Figures (in Ivrit) * Quick intro to Javascript
* Don't [over-]sweat "micro-optimization" * Parsing str's in VB6
* .ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); (src) * Break on a Lenovo T430: Fn+Alt+B
email if ya gotta, RSS if ya wanna RSS, (?_?), ยข, & ? if you're keypadless


Powered by Blogger etree.org Curmudgeon Gamer badge
The postings on this site are [usually] my own and do not necessarily reflect the views of any employer, past or present, or other entity.