java

Computer graphics programming in OpenGL with Java / V. Scott Gordon, John Clevenger

Gordon, V. Scott, author




java

The joy of pixeling and building pixel tools with HTML5 canvas and JavaScript

Some people knit, others do puzzles, and yet others find calm by colouring. Me, I love pixeling. My computer career started with a super basic computer. It didn’t even have a way to store what I programmed. So, every day, I would write myself a small program that allows me to paint on the screen […]




java

JavaScript Picture-in-Picture API

As a huge fan of media on the web, I’m always excited about enhancements to how we can control our media. Maybe I get excited about simple things like the <video> tag and its associated elements and attributes because media on the web started with custom codecs, browser extensions, and Flash. The latest awesome media […]

The post JavaScript Picture-in-Picture API appeared first on David Walsh Blog.




java

Javanese performances on an Indonesian stage : contesting culture, embracing change / Barbara Hatley

Hatley, Barbara




java

Performing otherness : Java and Bali on international stages, 1905-1952 / Matthew Isaac Cohen

Cohen, Matthew Isaac




java

Real-Time Search in JavaScript

What I meant was scanning the DOM of a page for text equivalents and showing the actual parts of the page, as well as hiding the irrelevant ones. I came up with the technique when I was designing Readerrr’s FAQ page. Take a look at the example:

I have also implemented the solution here on my blog.

How it works

All simple. Let’s take the FAQ page as an example. Here’s a typical markup:

<h1>FAQ</h1>
<div class="faq">
	<input type="search" value="" placeholder="Type some keywords (e.g. giza, babylon, colossus)" />
	<ul>
		<li id="faq-1">
			<h2><a href="#faq-1">Great Pyramid of Giza</a></h2>
			<div>
				<p>The Great Pyramid of Giza <!-- ... --></p>
				<!-- ... -->
			</div>
		</li>
		<li id="faq-2">
			<h2><a href="#faq-2">Hanging Gardens of Babylon</a></h2>
			<div>
				<p>The Hanging Gardens of Babylon <!-- ... --></p>
				<!-- ... -->
			</div>
		</li>
		<!-- ... -->
	</ul>
	<div class="faq__notfound"><p>No matches were found.</p></div>
</div>

I wrote a tiny piece of JavaScript code to handle the interaction and this is how it works:

  1. When the page loads, the script indexes the content of all li’s into browser’s memory.
  2. When a user types text into the search field, the script searches for equivalents among the indexed data and hides the corresponding li’s where no equivalents were found. If nothing found, a message is shown.
  3. The script highlights the text equivalents by replacing phases, for example, babylon becomes <span class="highlight">babylon</span>.

Now, try it yourself:

Demo

Taking it further

Since I chose FAQ page as an example, there are some issues to deal with.

Toggling the answers

It is a good practice to hide the answers by default and show them only when user needs them, that is to say when they press the question:

.faq > ul > li:not( .is-active ) > div
{
	display: none;
}
$( document ).on( 'click', '.faq h2 a', function( e )
{
	e.preventDefault();
	$( this ).parents( 'li' ).toggleClass( 'is-active' );
});

In the CSS part I use child combinator selector > because I don’t want to select and, therefore, to hide the elements of an answer, which may contain lists and div’s.

What if JavaScript is disabled

The user won’t be able to see the answers. Unless you show them by default or develop a JavaScript-less solution. To do this, take a closer look at these fragments of the markup:

  • <li id="faq-1">
  • <a href="#faq-1">

The usage of fragment identifiers enables us to take the advantage of CSS’s pseudo selector :target:

.faq > ul > li:not( :target ) > div
{
	display: none;
}

Furthermore, the real-time search is not possible as well. But you can either provide a sever-side search possibility or hide the search field and so as not to confuse the user:

<html class="no-js">
	<head>
		<!-- remove this if you use Modernizr -->
		<script>(function(e,t,n){var r=e.querySelectorAll("html")[0];r.className=r.className.replace(/(^|s)no-js(s|$)/,"$1$2")})(document,window,0);</script>
	</head>
</html>

I added a class name no-js to <html> element. The <script> part removes that class name. If JavaScript support is disabled in a browser, the class name won’t be removed; therefore:

.no-js .faq input
{
	display: none;
}

The no-js is a very handy technique, you can use it site-wide.

Improving UX

If there is only one list item that matches user’s query, it is a good practice to automatically show the content of that item, without requiring to press the title. To see what I mean, head over the GIF at the beginning of the post.

Hidden keywords

Here on my blog I have a filterable list of blog post titles only. Each post has some related keywords assigned. So, during the search, how do I make an item discoverable even if the title does not consist of a particular keyword? For example, how can I make the entry “Real-Time Search in JavaScript” visible if a user entered “jquery”? Yes, exactly, that is adding keywords and hiding them with CSS:

<li>
	<h2><a href="/real-time-search-in-javascript">Real-Time Search in JavaScript</a></h2>
	<p class="hidden-keywords" aria-hidden="true">jquery filter input html css</p>
</li>
.hidden-keywords
{
	display: none;
}

A simple trick but not always that obvious.


You will find two versions of the code in the source of the demo: without dependencies and jQuery-dependent. These versions are also divided into three groups of code so you can adapt only what your project needs.

Demo




java

How to Add a CSS and JavaScript Sticky Menu to Your Site

See the two ways to add a sticky horizontal menu to your site, plus 7 beautiful examples of this pattern out in the wild.




java

Smooth Scrolling HTML Bookmarks using JavaScript

See how to use native JavaScript to create smooth scrolling HTML bookmark links inside the page, and for those that need legacy browser support, using jQuery instead.




java

Disoriental / Négar Djavadi ; translated from the French by Tina Kover

Hayden Library - PQ3979.3.D53 D4713 2018




java

Beginning Java game development with LibGDX / Lee Stemkoski ; technical reviewer, Garry Patchett

Online Resource




java

Making games: with JavaScript / Christopher Pitt

Online Resource




java

Building a 2D game physics engine: using HTML5 and JavaScript / Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung

Online Resource




java

The advanced game developer's toolkit: create amazing Web-based games with JavaScript and HTML5 / Rex van der Spuy

Online Resource




java

Pro Java 9 games development: leveraging the JavaFX APIs / Wallace Jackson

Online Resource




java

Introducing JavaScript game development: build a 2D game from the ground up / Graeme Stuart

Online Resource




java

Java game development with LibGDX: from beginner to professional / Lee Stemkoski

Online Resource




java

Essential ASP.NET Web Forms Development: Full Stack Programming with C#, SQL, Ajax, and JavaScript / Beasley, Robert

Online Resource




java

Responsible JavaScript: Part III

You’ve done everything you thought was possible to address your website’s JavaScript problem. You relied on the web platform where you could. You sidestepped Babel and found smaller framework alternatives. You whittled your application code down to its most streamlined form possible. Yet, things are just not fast enough. When websites fail to perform the way we as designers and developers expect them to, we inevitably turn on ourselves:

“What are we failing to do?” “What can we do with the code we have written?” “Which parts of our architecture are failing us?”

These are valid inquiries, as a fair share of performance woes do originate from our own code. Yet, assigning blame solely to ourselves blinds us to the unvarnished truth that a sizable onslaught of our performance problems comes from the outside.

When the third wheel crashes the party

Convenience always has a price, and the web is wracked by our collective preference for it.  JavaScript, in particular, is employed in a way that suggests a rapidly increasing tendency to outsource whatever it is that We (the first party) don’t want to do. At times, this is a necessary decision; it makes perfect financial and operational sense in many situations.

But make no mistake, third-party JavaScript is never cheap. It’s a devil’s bargain where vendors seduce you with solutions to your problem, yet conveniently fail to remind you that you have little to no control over the side effects that solution introduces. If a third-party provider adds features to their product, you bear the brunt. If they change their infrastructure, you will feel the effects of it. Those who use your site will become frustrated, and they aren’t going to bother grappling with an intolerable user experience. You can mitigate some of the symptoms of third parties, but you can’t cure the ailment unless you remove the solutions altogether—and that’s not always practical or possible.

In this installment of Responsible JavaScript, we’ll take a slightly less technical approach than in the previous installment. We are going to talk more about the human side of third parties. Then, we’ll go down some of the technical avenues for how you might go about tackling the problem.

Hindered by convenience

When we talk about the sorry state of the web today, some of us are quick to point out the role of developer convenience in contributing to the problem. While I share the view that developer convenience has a tendency to harm the user experience, they’re not the only kind of convenience that can turn a website into a sluggish, janky mess.

Operational conveniences can become precursors to a very thorny sort of technical debt. These conveniences are what we reach for when we can’t solve a pervasive problem on our own. They represent third-party solutions that address problems in the absence of architectural flexibility and/or adequate development resources.

Whenever an inconvenience arises, that is the time to have the discussion around how to tackle it in a way that’s comprehensive. So let’s talk about what it looks like to tackle that sort of scenario from a more human angle.

The problem is pain

The reason third parties come into play in the first place is pain. When a decision maker in an organization has felt enough pain around a certain problem, they’re going to do a very human thing, which is to find the fastest way to make that pain go away.

Markets will always find ways to address these pain points, even if the way they do so isn’t sustainable or even remotely helpful. Web accessibility overlays—third-party scripts that purport to automatically fix accessibility issues—are among the worst offenders. First, you fork over your money for a fix that doesn’t fix anything. Then you pay a wholly different sort of price when that “fix” harms the usability of your website. This is not a screed to discredit the usefulness of the tools some third-party vendors provide, but to illustrate how the adoption of third-party solutions happens, even those that are objectively awful

A Chrome performance trace of a long task kicked off by a third party’s web accessibility overlay script. The task occupies the main thread for roughly 600 ms on a 2017 Retina MacBook.

So when a vendor rolls up and promises to solve the very painful problem we’re having, there’s a good chance someone is going to nibble. If that someone is high enough in the hierarchy, they’ll exert downward pressure on others to buy in—if not circumvent them entirely in the decision-making process. Conversely, adoption of a third-party solution can also occur when those in the trenches are under pressure and lack sufficient resources to create the necessary features themselves.

Whatever the catalyst, it pays to gather your colleagues and collectively form a plan for navigating and mitigating the problems you’re facing.

Create a mitigation plan

Once people in an organization have latched onto a third-party solution, however ill-advised, the difficulty you’ll encounter in forcing a course change will depend on how urgent a need that solution serves. In fact, you shouldn’t try to convince proponents of the solution that their decision was wrong. Such efforts almost always backfire and can make people feel attacked and more resistant to what you’re telling them. Even worse, those efforts could create acrimony where people stop listening to each other completely, and that is a breeding ground for far worse problems to develop.

Grouse and commiserate amongst your peers if you must—as I myself have often done—but put your grievances aside and come up with a mitigation plan to guide your colleagues toward better outcomes. The nooks and crannies of your specific approach will depend on the third parties themselves and the structure of the organization, but the bones of it could look like the following series of questions.

What problem does this solution address?

There’s a reason why a third-party solution was selected, and this question will help you suss out whether the rationale for its adoption is sound. Remember, there are times decisions are made when all the necessary people are not in the room. You might be in a position where you have to react to the aftermath of that decision, but the answer to this question will lead you to a natural follow-up.

How long do we intend to use the solution?

This question will help you identify the solution’s shelf life. Was it introduced as a bandage, with the intent to remove it once the underlying problem has been addressed, such as in the case of an accessibility overlay? Or is the need more long-term, such as the data provided by an A/B testing suite? The other possibility is that the solution can never be effectively removed because it serves a crucial purpose, as in the case of analytics scripts. It’s like throwing a mattress in a swimming pool: it’s easy to throw in, but nigh impossible to drag back out.

In any case, you can’t know if a third-party script is here to stay if you don’t ask. Indeed, if you find out the solution is temporary, you can form a plan to eventually remove it from your site once the underlying problem it addresses has been resolved.

Who’s the point of contact if issues arise?

When a third-party solution is put into place, someone must be the point of contact for when—not if—issues arise.

I’ve seen what happens (far too often) when a third-party script gets out of control. For example, when a tag manager or an A/B testing framework’s JavaScript grows slowly and insidiously because marketers aren’t cleaning out old tags or completed A/B tests. It’s for precisely these reasons that responsibility needs to be attached to a specific person in your organization for third-party solutions currently in use on your site. What that responsibility entails will differ in every situation, but could include:

  • periodic monitoring of the third-party script’s footprint;
  • maintenance to ensure the third-party script doesn’t grow out of control;
  • occasional meetings to discuss the future of that vendor’s relationship with your organization;
  • identification of overlaps of functionality between multiple third parties, and if potential redundancies can be removed;
  • and ongoing research, especially to identify speedier alternatives that may act as better replacements for slow third-party scripts.

The idea of responsibility in this context should never be an onerous, draconian obligation you yoke your teammates with, but rather an exercise in encouraging mindfulness in your colleagues. Because without mindfulness, a third-party script’s ill effects on your website will be overlooked until it becomes a grumbling ogre in the room that can no longer be ignored. Assigning responsibility for third parties can help to prevent that from happening.

Ensuring responsible usage of third-party solutions

If you can put together a mitigation plan and get everyone on board, the work of ensuring the responsible use of third-party solutions can begin. Luckily for you, the actual technical work will be easier than trying to wrangle people. So if you’ve made it this far, all it will take to get results is time and persistence.

Load only what’s necessary

It may seem obvious, but load only what’s necessary. Judging by the amount of unused first-party JavaScript I see loaded—let alone third-party JavaScript—it’s clearly a problem. It’s like trying to clean your house by stuffing clutter into the closets. Regardless of whether they’re actually needed, it’s not uncommon for third-party scripts to be loaded on every single page, so refer to your point of contact to figure out which pages need which third-party scripts.

As an example, one of my past clients used a popular third-party tool across multiple brand sites to get a list of retailers for a given product. It demonstrated clear value, but that script only needed to be on a site’s product detail page. In reality, it was frequently loaded on every page. Culling this script from pages where it didn’t belong significantly boosted performance for non-product pages, which ostensibly reduced the friction on the conversion path.

Figuring out which pages need which third-party scripts requires you to do some decidedly untechnical work. You’ll actually have to get up from your desk and talk to the person who has been assigned responsibility for the third-party solution you’re grappling with. This is very difficult work for me, but it’s rewarding when good-faith collaboration happens, and good outcomes are realized as a result.

Self-host your third-party scripts

This advice isn’t a secret by any stretch. I even touched on it in the previous installment of this series, but it needs to be shouted from the rooftops at every opportunity: you should self-host as many third-party resources as possible. Whether this is feasible depends on the third-party script in question.

Is it some framework you’re grabbing from Google’s hosted libraries, cdnjs, or other similar provider? Self-host that sucker right now.

Casper found a way to self-host their Optimizely script and significantly reduced their start render time for their trouble. It really drives home the point that a major detriment of third-party resources is the fact that their mere existence on other servers is one of the worst performance bottlenecks we encounter.

If you’re looking to self-host an analytics solution or a similar sort of script, there’s a higher level of difficulty to contend with to self-host it. You may find that some third-party scripts simply can’t be self-hosted, but that doesn’t mean it isn’t worth the trouble to find out. If you find that self-hosting isn’t an option for a third-party script, don’t fret. There are other mitigations you can try.

Mask latency of cross-origin connections

If you can’t self-host your third-party scripts, the next best thing is to preconnect to servers that host them. WebPageTest’s Connection View does a fantastic job of showing you which servers your site gathers resources from, as well as the latency involved in establishing connections to them.

WebPageTest’s Connection View shows all the different servers a page requests resources from during load.

Preconnections are effective because they establish connections to third-party servers before the browser would otherwise discover them in due course. Parsing HTML takes time, and parsers are often blocked by stylesheets and other scripts. Wherever you can’t self-host third-party scripts, preconnections make perfect sense.

Maybe don’t preload third-party scripts

Preloading resources is one of those things that sounds fantastic at first—until you consider its potential to backfire, as Andy Davies points out. If you’re unfamiliar with preloading, it’s similar to preconnecting but goes a step further by instructing the browser to fetch a particular resource far sooner than it ordinarily would.

The drawback of preloading is that while it’s great for ensuring a resource gets loaded as soon as possible, it changes the discovery order of that resource. Whenever we do this, we’re implicitly saying that other resources are less important—including resources crucial to rendering or even core functionality.

It’s probably a safe bet that most of your third-party code is not as crucial to the functionality of your site as your own code. That said, if you must preload a third-party resource, ensure you’re only doing so for third-party scripts that are critical to page rendering.

If you do find yourself in a position where your site’s initial rendering depends on a third-party script, refer to your mitigation plan to see what you can do to eliminate or ameliorate your dependence on it. Depending on a third party for core functionality is never a good position to be in, as you’re relinquishing a lot of control to others who might not have your best interests in mind.

Lazy load non-essential third-party scripts

The best request is no request. If you have a third-party script that doesn’t need to be loaded right away, consider lazy loading it with an Intersection Observer. Here’s what it might look like to lazy load a Facebook Like button when it’s scrolled into the viewport:


let loadedFbScript = false;

const intersectionListener = new IntersectionObserver(entries => {
  entries.forEach(entry => {
    if ((entry.isIntersecting || entry.intersectionRatio) && !loadedFbScript) {
      const scriptEl = document.createElement("script");

      scriptEl.defer = true;
      scriptEl.crossOrigin = "anonymous";
      scriptEl.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0";
      scriptEl.onload = () => {
        loadedFbScript = true;
      };
      
      document.body.append(scriptEl);
    }
  });
});

intersectionListener.observe(document.querySelector(".fb-like"));

In the above snippet, we first set a variable to track whether we’ve loaded the Facebook SDK JavaScript. After that, an IntersectionListener is created that checks whether the observed element is in the viewport, and whether the Facebook SDK has been loaded. If the SDK JavaScript hasn’t been loaded, a reference to it is injected into the DOM, which will kick off a request for it.

You’re not going to be able to lazy load every third-party script. Some of them simply need to do their work at page load time, or otherwise can’t be deferred. Regardless, do the detective work to see if it’s possible to lazy load at least some of your third-party JavaScript.

One of the common concerns I hear from coworkers when I suggest lazy loading third-party scripts is how it can delay whatever interactions the third party provides. That’s a reasonable concern, because when you lazy load anything, a noticeable delay may occur as the resource loads. You can get around this to some extent with resource prefetching. This is different than preloading, which we discussed earlier. Prefetching consumes a comparable amount of data, yes, but prefetched resources are given lower priority and are less likely to contend for bandwidth with critical resources.

Staying on top of the problem

Keeping an eye on your third-party JavaScript requires mindfulness bordering on hypervigilance. When you recognize poor performance for the technical debt that it truly is, you’ll naturally slip into a frame of mind where you’ll recognize and address it as you would any other kind of technical debt.

Staying on top of third parties is refactoring—a sort that requires you to periodically perform tasks such as cleaning up tag managers and A/B tests, consolidating third-party solutions, eliminating any that are no longer needed, and applying the coding techniques discussed above. Moreover, you’ll need to work with your team to address this technical debt on a cyclical basis. This kind of work can’t be automated, so yes, you’ll need to knuckle down and have face-to-face, synchronous conversations with actual people.

If you’re already in the habit of scheduling “cleanup sprints” on some interval, then that is the time and space for you to address performance-related technical debt, regardless of whether it involves third- or first-party code. There’s a time for feature development, but that time should not comprise the whole of your working hours. Development shops that focus only on feature development are destined to be wholly consumed by the technical debt that will inevitably result.

So it will come to pass that in the fourth and final installment of this series we’ll discuss what it means to do the hard work of using JavaScript responsibly in the context of process. Therein, we’ll explore what it takes to unite your organization under the banner of making your website faster and more accessible, and therefore more usable for everyone, everywhere.




java

Exporting modules in JavaScript

In my latest entry I explain the difference about exporting a module between server side or CLI environments such Nashorn, SpiderMonkey, JSC, or micro controller and embedded engines such Duktape, Espruino, KinomaJS, and Desktop UI space via GJS.
Using this is a universal way to attach and export properties but when it comes to ES2015 modules, incompatible with CommonJS and with an undefined execution context.
Enjoy




java

The missing analysis in JavaScript "Real" Mixins

I love hacks and unusual patterns! As logical consequence, I loved this post about "Real" Mixins!!!
The only hitch about that post is that I believe there are few points closer to a "gonna sell you my idea" discussion than a non disillusioned one.
Let's start this counter analysis remembering what are actually classes in latest JavaScript standard, so that we can move on explaining what's missing in there.

JavaScript embraces prototypal inheritance

It doesn't matter if ES6 made the previously reserved class keyword usable; at the end of the day we're dealing with a special syntactical shortcut to enrich a generic prototype object.

// class in ES2015
class A {
constructor() {}
method() {}
get accessor() {}
set accessor(value) {}
}

// where are those methods and properties defined?
console.log(
Object.getOwnPropertyNames(A.prototype)
// ["constructor", "method", "accessor"]
);
Accordingly, declaring a generic class consists in bypassing the following procedure:

function A() {}
Object.defineProperties(
A.prototype,
{
// constructor is implicitly defined
method: {
configurable: true,
writable: true,
value: function method() {}
},
accessor: {
configurable: true,
get: function get() {},
set: function set(value) {}
}
}
);
If you don't trust me, trust what a transpiler would do, summarized in the following code:

var A = (function () {
// the constructor
function A() {
_classCallCheck(this, _temporalAssertDefined(A, "A", _temporalUndefined) && A);
}
// the enriched prototype
_createClass(_temporalAssertDefined(A, "A", _temporalUndefined) && A, [{
key: "method",
value: function method() {}
}, {
key: "accessor",
get: function get() {},
set: function set(value) {}
}]);

return _temporalAssertDefined(A, "A", _temporalUndefined) && A;
})();
If there is some public static property in the definition, its assignment to the constructor would be the second bypassed part.

The super case

The extra bit in terms of syntax that makes ES6 special is the special keyword super. Being multiple inheritance not possible in JavaScript, we could think about super as the static reference to the directly extended prototype. In case of the previous B class, which extends A, we can think about super variable like if it was defined as such:

// used within the constructor
let super = (...args) => A.apply(this, arguments);

// used within any other method
super.method = (...args) => A.prototype.method.apply(this, args);

// used as accessor
Object.defineProperty(super, 'accessor', {
get: () => Object.getOwnPropertyDescriptor(
A.prototype, 'accessor'
).get.call(this),
set: (value) => Object.getOwnPropertyDescriptor(
A.prototype, 'accessor'
).set.call(this, value)
});
Now that we have a decent understanding on how inheritance works in JavaScript and what it means to declare a class, let's talk about few misleading points sold as pros or cons in the mentioned article.

Prototypes are always modified anyway!

We've just seen that defining a class technically means enriching its prototype object. This already invalidates somehow Justin point but there's more to consider.
When Justin exposes his idea on why current solutions are bad, he says that:
When using mixin libraries against prototype objects, the prototypes are directly mutated. This is a problem if the prototype is used anywhere else that the mixed-in properties are not wanted.
The way Justin describes this issue is quite misleading because mutating prototypes at runtime is a well known bad practice.
Indeed, I believe every single library he mentioned in that post, and he also forgot mine, is not designed to mutate classes prototypes at runtime ... like: not at all!
Every single mixin proposal that is capable of implementing mixins via classes is indeed designed to define these classes at definition time, not at runtime!
Moreover, whatever solution Justin proposed will not guard any class from being modified at runtime later on!
The same way he's defining his final classes during their definitions, mixins-for-classes oriented libraries have exactly the same goal: you define your class and its mixins during the class definition time!
The fact mixins add properties to a prototype is a completely hidden matter that at class definition time is everything but bad.
Also, no property is modified in place, because mixins are there to enrich, not to modify ... and having a prototype enriched means also that it's easier to spot name clashing and methods or properties conflicts ... but I'll come back to that later ...

super actually should NOT work!

The main bummer about the article is that it starts in a very reasonable way, describing mixins and classes, and also analyzing their role in a program.
The real, and only, difference between a mixin and normal subclass is that a normal subclass has a fixed superclass, while a mixin definition doesn't yet have a superclass.
Justin started right at the very beginning, and then degenerated with all sort of contradictions such:
Then finally he's back to Sanity Village with the following sentence:
super calls can be a little unintuitive for those new to mixins because the superclass isn't known at mixin definition, and sometimes developers expect super to point to the declared superclass (the parameter to the mixin), not the mixin application.
And on top of that, Justin talks about constructors too:
Constructors are a potential source of confusion with mixins. They essentially behave like methods, except that overriden methods tend to have the same signature, while constructors in a inheritance hierarchy often have different signatures.
In case you're not convinced yet how much messed up could be the situation, I'd like to add extra examples to the plate.
Let's consider the word area and its multiple meanings:
  • any particular extent of space or surface
  • a geographical region
  • any section reserved for a specific function
  • extent, range, or scope
  • field of study, or a branch of a field of study
  • a piece of unoccupied ground; an open space
  • the space or site on which a building stands
Now you really have to tell me in case you implement a basic Shape mixin with an area() method what the hack would you expect when invoking super. Moreoever, you should tell me if for every single method you are going to write within a mixin, you are also going to blindly invoke super with arbitrary amount of arguments in there ...

So here my quick advice about calling blindly a super: NO, followed by DON'T and eventually NEVER!

Oversold super ability

No kidding, and I can't stress this enough ... I've never ever in my life wrote a single mixin that was blindly trusting on a super call. That would be eventually an application based on mixins but that's a completely different story.
My feeling is that Justin tried to combine at all cost different concepts, probably mislead by his Dart background, since mentioned as reference, where composition in Dart was indeed classes based and the lang itself exposes native mixins as classes ... but here again we are in JavaScript!

instanceof what?

Another oversold point in Justin's article is that instanceof works.
This one was easy to spot ... I mean, if you create a class at runtime everytime the mixin is invoked, what exactly are you capable of "instanceoffing" and why would that benefit anyone about anything?
I'm writing down his very same examples here that will obviously all fail:

// a new anonymous class is created each time
// who's gonna benefit about the instanceof?
let MyMixin = (superclass) => class extends superclass {
foo() {
console.log('foo from MyMixin');
}
};

// let's try this class
class MyClass extends MyMixin(MyBaseClass) {
/* ... */
}

// Justin says it's cool that instanceof works ...
(new MyClass) instanceof MyMixin; // false
// false ... really, it can't be an instance of
// an arrow function prototype, isn't it?!
Accordingly, and unless I've misunderstood Justin point in which case I apologies in advance, I'm not sure what's the exact point in having instanceof working. Yes, sure the intermediate class is there, but every time the mixin is used it will create a different class so there's absolutely no advantage in having instanceof working there ... am I right?

Improving **Objects** Composition

In his Improving the Syntax paragraph, Justin exposes a very nice API summarized as such:

let mix = (superclass) => new MixinBuilder(superclass);

class MixinBuilder {
constructor(superclass) {
this.superclass = superclass;
}

with(...mixins) {
return mixins.reduce((c, mixin) => mixin(c), this.superclass);
}
}
Well, this was actually the part I've liked the most about his article, it's a very simple and semantic API, and it also doesn't need classes at all to be implemented for any kind of JS object!
How? Well, simply creating objects from objects instead:

let mix = (object) => ({
with: (...mixins) => mixins.reduce(
(c, mixin) => Object.create(
c, Object.getOwnPropertyDescriptors(mixin)
), object)
});
It could surely be improved in order to deal with classes too but you get the idea:

let a = {a: 'a'};
let b = {b: 'b'};
let c = {c: 'c'};
let d = mix(c).with(a, b);
console.log(d);
Since the main trick in Justin proposal is to place an intermediate class in the inheritance chain, defining at runtime each time the same class and its prototype, I've done something different here that doesn't need to create a new class with its own prototype or object each time, while preserving original functionalities without affecting them.

Less RAM to use, a hopefully coming soon native Object.getOwnPropertyDescriptors that should land in ES7 and make extraction faster, and the ability to use the pattern with pretty much everything out there, modern or old.
The gist is here, feel free to reuse.

As Summary ...

Wrapping up this post, with latter proposal we can actually achieve whatever Justin did with his intermediate classes approach but following different goals:
  1. Mixins are added to the prototype chain.
  2. Mixins are applied without modifying existing objects.
  3. Mixins do no magic, and don't define new semantics on top of the core language.
  4. super.foo property access won't hopefully work within mixins but it will with subclasses methods.
  5. super() calls won't hopefully work in mixins constructors because you've no idea what kind of arguments you are going to receive. Subclasses still work as expected.
  6. Mixins are able to extend other mixins.
  7. instanceof has no reason to be even considered in this scenario since we are composing objects.
  8. Mixin definitions do not require library support - they can be written in a universal style and be compatible with non classes based engines too.
  9. bonus: less memory consumption overall, there's no runtime duplication for the same logic each time
I still want to thanks Justin because he made it quite clear that still not everyone fully understands mixins but there's surely a real-world need, or better demand, in the current JavaScript community.

Let's hope the next version of ECMAScript will let all of us compose in a standard way that doesn't include a footgun like super through intermediate classes definition could do.
Thanks for your patience reading through this!




java

JavaScript Interfaces

In this Implementing Interfaces in JavaScript blog entry I'll show a new way to enrich prototypal inheritance layering functionalities a part, without modifying prototypes at all. A different, alternative, and in some case even better, approach to mixins.




java

15 Blogs Every Javascript Developer Should Follow in 2020

I’ve been following the most interesting JavaScript blogs quite for a while now (this is a part of my job running https://weekendjs.com/). There are many of them. More than you might think. There are blogs started more than ten years ago, and there are relatively new ones. Some bloggers are JavaScript superstars, and others are regular […]

The post 15 Blogs Every Javascript Developer Should Follow in 2020 appeared first on DevelopIntelligence.




java

The Weird World of Infinity in JavaScript

You are probably aware that ECMAScript has something called Infinity, which is a numeric value that you can apply to any variable, the same way you can apply other numbers as values for variables.

Infinity of course is not the same as other numbers, so I thought I’d summarize, with examples, many of the quirks and useful facts around JavaScript Infinity and how it works.

The post The Weird World of Infinity in JavaScript appeared first on Impressive Webs.



  • JavaScript & jQuery
  • Web Design Tutorials

java

Thermophiles for biotech industry: a bioprocess technology perspective / Jujjavarapu Satya Eswari, Swasti Dhagat, Ramkrishna Sen

Online Resource




java

Real-Time IoT Imaging with Deep Neural Networks: Using Java on the Raspberry Pi 4 / Modrzyk, Nicolas

Online Resource




java

Java : an introduction to problem solving & programming / Walter Savitch (University of California, San Diego) ; contributor, Kenrick Mock (University of Alaska Anchorage)

Savitch, Walter J., 1943- author




java

005 JSJ Javascript Objects

The panelists discuss JavaScript objects.




java

007 JSJ Online Resources for Javascript Developers

The panelists discuss online resources for JavaScript Developers.




java

009 JSJ Testing JavaScript with Joe Eames

The panelists discuss testing JavaScript with Joe Eames




java

011 JSJ Can HTML5 and JavaScript Really Replace Flash?

The panelists discuss whether HTML5 and JavaScript can really replace Flash.




java

012 JSJ Design Patterns in JavaScript with Addy Osmani

The panelists talk about design patterns in JavaScript with Addy Osmani




java

027 JSJ The JavaScript Community

The panelists discuss the JavaScript community at large.




java

030 JSJ Learning & Teaching JavaScript with Noel Rappin

Panel Noel Rappin (twitter github blog) Jamison Dance (twitter github blog) Charles Max Wood (twitter github Teach Me To Code Intro to CoffeeScript) AJ O’Neal (twitter github blog) Discussion 00:52 - Works in training and talent development for Groupon 00:56 - Author of Rails Test Prescriptions and upcoming Master Space and Time with JavaScript 01:21 - Writing a book about JavaScript 02:33 - Focus of the book Part 1: Jasmine and jQuery and the JavaScript Object Model Part 2: Extended examples of jQuery Part 3: Backbone Part 4: Ember 03:46 - Self-published authors 05:15 - Approaches and mindsets to learning JavaScript 06:04 - “Gotchas!” and bad features in Javascript 09:17 - Modeling JavaScript for beginners 11:23 - (AJ joins the podcast) 11:42 - Resources/Classes for learning JavaScript Good Parts Book: Douglas Crockford JavaScript Patterns: Stoyan Stefanov Eloquent JavaScript: A Modern Introduction to Programming: Marijn Haverbeke Maintainable JavaScript: Nicholas C. Zakas 13:54 - Hiring people with JavaScript experience at Groupon 15:12 - Training workshops 17:00 - Getting new hires up to speed quickly Pairing Mentoring Lectures Workshops 21:38 - Book Learning You can learn at your own pace But it’s hard to ask questions to a book 22:51 - How Noel gained expertise in JavaScript 24:38 - Code reading and learning to program a language 26:18 - Teaching people JavaScript as their very first language 31:55 - Classroom layout 33:42 - Online training Kahn Academy Computer Science Code Academy Starter League 40:00 - Finding a mentor Stack Overflow Picks Shrines by Purity Ring (Jamison) Learnable Programming: Bret Victor (Jamison) Mob Software: Richard P. Gabriel & Ron Goldman (Jamison) Monoprice.com (AJ) ZREO: Zelda Reorchestrated (AJ) The Official Twitter App (Chuck) Fluid App (Chuck) Try Jasmine! (Noel) Justin Searls (Noel) The Atrocity Archives: Charles Stross (Noel) Futurity: A Musical by The Lisps (Noel) Transcript NOEL: I’m trying to figure out where the chat is in this stupid Skype interface. JAMISON: Just imagine the worst place it could possibly be and that’s where it is. [This episode is sponsored by ComponentOne, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to wijmo.com and check them out.] [Hosting and bandwidth provided by The Blue Box Group. Check them out at bluebox.net] CHUCK: Hey everybody and welcome to Episode 30 of the JavaScript Jabber show! This week on our panel we have, Jamison Dance. JAMISON: Hey guys! CHUCK: I’m Charles Max Wood from devchat.tv and this week, we have a special guest and that’s Noel Rappin! NOEL: Hey everybody! CHUCK: For the people who don’t know who you are, you want to introduce yourself, Noel? NOEL:  Sure. I currently work in training and talent development for Groupon. And I am the author of previously “Rails Test Prescriptions” and currently a self-published book called “Master Time and Space with JavaScript”, which you can get at noelrappin.com. I need to spell that out, right? N-o-e-l-r-a-p-p-i-n.com CHUCK: So I’m little curious, before we get into the topic which is learning and teaching JavaScript, how did you get into writing a book about JavaScript? What’s your background there? NOEL: You know, it actually relates to teaching and learning JavaScript. I think, I was like… a lot of long time web devs. I spent my first round as a web consultant in around, turn of the century 2000’s. I spent time trying to talk clients out of JavaScript stuff because it was such a pain in the neck. And I kind of got away from it for awhile and came back a couple of years ago to realize that basically, everything had changed and they were actually usable tools now. And last summer, I was working with a… at that time,




java

044 JSJ Book Club: Effective JavaScript with David Herman

Panel David Herman (twitter blog Effective JavaScript) Jamison Dance (twitter github blog) AJ O’Neal (twitter github blog) Joe Eames (twitter github blog) Merrick Christensen (twitter github) Tim Caswell (twitter github howtonode.org) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Discussion 01:01 - David Herman Introduction Mozilla Mozilla Research TC39 - ECMAScript 01:45 - Effective JavaScript by David Herman 04:27 - Reader Opinions & Controversy JavaScript:The Good Parts by Douglas Crockford 09:09 - ES3 Shimming 11:25 - Code: effectivejs/code 12:50 - Parts of the Book 15:54 - Blocking Web Gestures With getUserMedia: Part1: Aaron Frost 17:28 - Book Level of Difficulty Effective C++ by Scott Meyers 20:09 - Asynchronous APIs Recursion Tail-Call Optimization 26:51 - Programming Language Academics 30:55 - DOM Integration Effective C++ by Scott Meyers Effective STL by Scott Meyers 31:50 - Advice for JavaScript Beginners Eloquent Javascript by Marijn Haverbeke JavaScript Enlightenment by Cody Lindley How to Design Programs 33:16 - Advice for Programmers in General 34:53 - Performance 38:16 - The JavaScript Language 40:45 - Primitives Vs Wrapper Classes 42:37 - Semicolons 45:24 - -0/+0 Picks Jack (Tim) Putting Constants on the Left (AJ) Getting Started with Amazon AWS EC2 (1 year free VPS web hosting) (AJ) Notes on Distributed Systems for Young Bloods: Jeff Hodges (Jamison) Hurdles getting started with Ember.js (Jamison) Grieves (Merrick) The Scala Programming Language (Merrick) Antoine Dufour (Joe) Torchlight II (Joe) Appliness Digital Magazine (Joe) Powermat Home & Office Mat (Chuck) Une Bobine (Chuck) The Rust Programming Language (David) mozilla/servo (David) Roominate Toy (David) OpenWest Conference Call For Papers (AJ) Transcript CHUCK:  The most effective way to hack is quickly. [Hosting and bandwidth provided by the Blue Box Group. Check them out at bluebox.net.] [This episode is sponsored by Component One, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.] CHUCK:  Hey everybody and welcome to Episode 44 of the JavaScript Jabber show. This week on our panel, we have Jamison Dance. JAMISON:  Hello. CHUCK:  AJ O’Neal. AJ:  Yo! Yo! Yo! Coming at you live from the living roomisphere of Provo, Utah. CHUCK:  We have Joe Eames. JOE:  Hi. CHUCK:  Merrick Christensen. MERRICK:  What’s up guys? CHUCK:  Tim Caswell. TIM:  Hello. CHUCK:  I'm Charles Max Wood from devchat.tv and this week, we have a special guest, Dave Herman. DAVE:  Hi there. CHUCK:  So Dave, you haven’t been on the show before. Do you want to introduce yourself? DAVE:  Sure. I work for Mozilla. I have sort of helped create this new department called Mozilla Research where we do a whole bunch of web platform experiments and new technology for the web. And I also am on the horribly named TC39, the standards organization for ECMAScript, working on the next edition of the JavaScript standard. CHUCK:  Cool. DAVE:  Oh, and I wrote this book. CHUCK: You did this book. TIM:  You didn’t just read it and then become an expert on the book and then talk on a podcast about it? [Laughter] CHUCK:  So, I heard about this book. I’m a little curious when you started writing the book, I mean, what was the idea behind it? What inspired it? DAVE:  To tell you the truth, I had no intention of writing a book, it didn’t occur to me. But the publishers reached out to me, I guess they heard of me through TC39, maybe ‘es-discuss’ or something. But they said, “Okay we’ve got this series, this Effective series.” And I was very familiar with Effective C++ which I think is a great book and I really like the format. And just when they approached me, I kind of thought, “You know,




java

048 JSJ Why JavaScript Is Hard

Panel Joe Eames (twitter github blog) Tim Caswell (twitter github howtonode.org) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) AJ O’Neal (twitter github blog) Discussion 00:56 - Why JavaScript is hard to learn 02:30 - This 05:30 - Bind 09:11 - Browsers 11:01 - Class-based inheritance Prototypal inheritance 16:37 - New function 18:51 - Closures 20:51 - JavaScript is asynchronous 22:14 - Variable scoping Hoisting 26:14 - Numbers and math (AJ joins the podcast) == ’s vs === ’s 32:15 - Things that make JavaScript hard after learning JavaScript Package management 35:06 - Numbers (cont’d) Crypto Bitwise operations Strings Effective JavaScript by David Herman 044 JSJ Book Club: Effective JavaScript with David Herman 40:16 - Changing/Evolving JavaScript 43:31 - Environmental reasons that make JavaScript Hard Tooling 48:25 - Few projects are primarily JavaScript 49:07 - Adolescence and the JavaScript Ecosystem 53:59 - Running JavaScript Picks Sharpie Metallic Silver (AJ) The how and why of auto-executing functions (in JavaScript) (AJ) The JavaScript Unicycle (AJ) RSA (Tim) OUYA (Tim) Borderlands 2 (Joe) MechWarrior Tactics (Chuck) Testing Clientside JavaScript (Joe) Fire Up Ember.js | PeepCode (Chuck) Meet Chef (Part 2 of 2) | PeepCode (Chuck) Next Week MooTools with Arian Stolwijk and Valerio Proietti Transcript TIM:  I’m just learning lots of math and attempting to do real math in JavaScript is a fun challenge. [Hosting and bandwidth provided by the Blue Box Group. Check them out at  Bluebox.net.] [This episode is sponsored by Component One, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.] CHUCK:  Hey everybody and welcome to Episode 48 of the JavaScript Jabber show. This week on our panel, we have Joe Eames. JOE:  Howdy! CHUCK:  We also have Tim Caswell. TIM:  Hello! CHUCK:  And I’m Charles Max Wood from DevChat.tv. And when this episode goes out, you’re going to have about two weeks left if you wanted to sign up for my Rails Ramp Up course. You’ll find that at RailsRampUp.com. I’ve been working hard on that. This week, we’re going to talk about why JavaScript is hard. And I think it was Tim that came on and said, “So, we’re talking about why JavaScript sucks?” And I didn’t want to call it that but at the same time, it’s one of the -- I think the reasons that people find JavaScript hard and the reasons some people say that JavaScript sucks are kind of the same thing. So, if you want to think of it that way, go right ahead. But I kind of wanted to talk about this for a couple of reasons. One was that I was at the users’ group meeting last week and they talked about some of the things that make JavaScript hard and I don’t remember what they all were. But there were a few things that, there are some concepts that are markedly different from what you find in other languages or at least some of the concepts exist in the other languages but they aren’t kind of as important or as in-your-face as they are in JavaScript. Anyway, the other reason is that I was thinking about when I first started this show. And when I first started the show, I was a web developer that was kind of like, “jQuery, whoo!” And thought jQuery and JavaScript, you know, were mostly the same in the sense that the only way to write sane JavaScript was to use jQuery. And so, I wanted to talk around some of the things that I’ve learned over the last year from the other panelists and help people who are coming into JavaScript understand the real power behind some of these other concepts. So that being said, let’s go ahead and get started. I’m a little curious as to what you guys think are some of the hard things that people run into in JavaScript, like why do they struggle with it? TIM:  Alright. So,




java

054 JSJ JavaScript Parsing, ASTs, and Language Grammar w/ David Herman and Ariya Hidayat

Use this link and code JAVAJAB to get 20% off your registration for FluentConf 2013! Panel David Herman (twitter blog Effective JavaScript) Ariya Hidayat (twitter github blog) Tim Caswell (twitter github howtonode.org) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Merrick Christensen (twitter github) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Discussion 00:48 - David Herman and Ariya Hidayat Introduction 044 JSJ Book Club: Effective JavaScript with David Herman 023 JSJ Phantom.js with Ariya Hidayat 01:54 - Parsing JavaScript and ASTs and Language Grammars 04:44 - Semantics 06:08 - Abstract Syntax Tree (AST) Esprima: Parser SpiderMonkey 10:37 - Lexer 12:16 - Writing your own language creationix / jack The C Programming Language 17:41 - Parser Generators JavaScriptCore 21:04 - Evolving a Syntax Automatic Semicolon Insertion Post correspondence problem Halting problem 28:05 - Language Design The Rust Programming Language 30:35 - Grammar Regular Expressions (Regex) Backus–Naur Form (BNF) Recursion How to Design Programs (HTDP) 38:00 - Recursive Descent Parsers 42:48 - Benefits of knowing language internals and syntax Apache Lucene - Apache Lucene Core LPeg - Parsing Expression Grammars For Lua 48:48 - Abstract Syntax Tree (AST) Picks Mass Effect 3 (Joe) A Beginner's Guide to Irrational Behavior | Coursera (Joe) Go write a programming language to learn one (Tim) Thumbs and Ammo (Jamison) ISM by Savant (Jamison) Vimcasts (Jamison) The iPhreaks Show (Chuck) Mozy (Chuck) Tech & Go Bright Pink Micro USB Cable (David) asm.js (David) Beyond Office Politics: The Hidden Story of Power, Affiliation & Achievement in the Workplace by Linda Sommer (Ariya) gotwarlost / istanbul (Ariya) Next Week Web Developer Skills Transcript JAMISON:  I am Linus Torvalds and I pronounce Linux, Linix. [Hosting and bandwidth provided by the Blue Box Group. Check them out at Bluebox.net.] [This episode is sponsored by Component One, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.] CHUCK:  Hey everybody and welcome to Episode 54 of the JavaScript Jabber Show. This week on our panel, we have Tim Caswell. TIM:  Hello. CHUCK:  Jamison Dance. JAMISON:  Hi guys. CHUCK:  Joe Eames. JOE:  Hey there. CHUCK:  Merrick Christensen. MERRICK:  Hey guys, what’s up? CHUCK:  I’m Charles Max Wood from DevChat.tv. And we have two special guests this week. We have Dave Herman. DAVID:  Hey there. CHUCK:  Ariya Hidayat. ARIYA:  Hello everyone. CHUCK:  And these guys are so smart that we brought them back. So, if you’re interested, we’ll put links to the episodes that they were on. David was on when we talked about his book ‘Essential JavaScript’ and Ariya was on when we talked about PhantomJS. JAMISON:  Effective JavaScript. CHUCK:  Effective? What did I say? MERRICK:  Essential. CHUCK:  Essential? Well, it’s an essential book on Effective JavaScript. How’s that? [Laughter] MERRICK:  Good save. DAVID:  At least, you didn’t say Defective JavaScript. [Laughter] CHUCK:  No, that’s what I write. I’m really good at writing defective JavaScript. ARIYA:  Actually, there’s a book about Essential on Defective JavaScript. CHUCK:  I also want to announce really quickly that Fluent Conf has given us a discount code. So, if you want to get 20% off on your registration for Fluent Conf, just enter JAVAJAB and you’ll get 20% off when you register for Fluent Conf. Alright. Well, let’s get started. This is going to be a really, really interesting topic and it’s something that I’ve wanted to know more about for a long time. And I just haven’t delved as deeply into it as I would like to. And that is,




java

066 JSJ Transitioning to JavaScript

Panel Joe Eames (twitter github blog) Merrick Christensen (twitter github) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Discussion 01:10 - Making the transition from one primary language to JavaScript 01:30 - Merrick’s Experience ActionScript 03:32 - Joe’s Experience .NET Microsoft 07:46 - Moving from C# to JavaScript Misconceptions 09:25 - JavaScript Misconceptions 10:59 - Chuck’s Experience Ruby on Rails 14:25 - Rails and JavaScript Avoidance 15:25 - Microsoft and JavaScript Avoidance 16:58 - JavaScript Development in General Browsers and Problems 23:38 - Libraries and Tools 044 JSJ Book Club: Effective JavaScript with David Herman Effective JavaScript by David Herman 24:45 - Code Structure 27:03 - node.js 28:00 - Learning core concepts behind JavaScript 29:11 - Understanding Clojures, Scoping & Context 29:53 - Testing 31:35 - Deviating off the common path 33:10 - Idiomatic JavaScript Picks Dart (Merrick) ES6 Plans (Merrick) Defiance (Joe) America's Got Talent (Joe) StarCraft II World Championship Series (WCS) (Joe) Continuum (Chuck) Fringe (Chuck) CleanMyMac (Chuck) Book Club JavaScript Allongé with Reginald Braithwaite!  He will join us for an episode to discuss the book on August 1st. The episode will air on August 9th. Next Week Testem with Toby Ho Transcript CHUCK:  Yeah, I can pretend I’m getting better at JavaScript. [Hosting and bandwidth provided by the Blue Box Group. Check them out at BlueBox.net.]  [This episode is sponsored by Component One, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.]  [This podcast is sponsored by JetBrains, makers of WebStorm. Whether you’re working with Node.js or building the frontend of your web application, WebStorm is the tool for you. It has great code quality and code exploration tools and works with HTML5, Node, TypeScript, CoffeeScript, Harmony, LESS, Sass, Jade, JSLint, JSHint, and the Google Closure Compiler. Check it out at JetBrains.com/WebStorm.] CHUCK:  Hey everybody, and welcome to Episode 66 of the JavaScript Jabber Show. This week on our panel, we have Joe Eames. JOE:  Hi there. CHUCK:  And Merrick Christensen. MERRICK:  Hey guys. CHUCK:  I’m Charles Max Wood from DevChat.TV. And this week, we’re going to be talking about, I think it’s kind of a blend of making the transition from one primary language to JavaScript, it usually happens through web development, and some of the mistakes that people make when their primary language is not JavaScript. Let’s go ahead and get started. Merrick, you’re kind of the expert guy that I always look at and go, “Man, he’s awesome at JavaScript.” So, I’m wondering, did you start out at JavaScript or did you come in from somewhere else? MERRICK:  Oh, that’s really nice of you, man. I actually started out with ActionScript. I really loved Flash developments, but it’s the same thing, really. They’re both based off of ECMAScript. So, I guess you could say I’ve always done JavaScript. JOE:  So, ActionScript is nearly identical to JavaScript? MERRICK:  Well, not anymore. ActionScript 3 developed classes and they typed it and they did some interesting things to make it more of a full-featured language. It’s got more [inaudible] than JavaScript now, I think. But I ended up getting into JavaScript when I was like 17 or so. I came across the MooTools framework and ever since then, it’s been all JavaScript all the time. CHUCK:  You’re pretty young. Wasn’t that last year? [Laughter] MERRICK:  Close. No, about six years, five years of JavaScript. JOE:  You’re also, though, like a real student of languages. You love studying other languages. MERRICK:  I love programming languages, yeah. JOE:  I think you’re a pretty funny, not necessarily unique,




java

070 JSJ Book Club: JavaScript Allongé with Reginald Braithwaite

Panel Reginald Braithwaite (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) AJ O’Neal (twitter github blog) Merrick Christensen (twitter github) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Discussion 02:08 - Reg Braithwaite Introduction Github 03:46 - JavaScript Allongé by Reginald Braithwaite 06:43 - The Y Combinator Kestrels, Quirky Birds, and Hopeless Egocentricity by Reginald Braithwaite 14:26 - Book Summary/Perspective Functions QED, The Strange Theory of Light and Matter by Richard P. Feynman 21:37 - Footnotes Flashman: A Novel by George MacDonald Fraser 26:42 - allong.es Michael Fogus 29:15 - Sharing Knowledge & Information 33:01 - The Coffee Theme CoffeeScript Ristretto by Reginald Braithwaite 37:42 - Favorite Parts of the Book How Prototypes Work Combinators 42:18 - Writing the Beginning 44:41 - Reg’s Programming Background One Two Three . . . Infinity: Facts and Speculations of Science by George Gamow Picks ng-conf (Joe & Merrick) LUMOback (Merrick) Twilio (AJ) Bountysource (AJ) Brian Stevens / Data Porters (Chuck) InformIT (Chuck) Safari Books Online (Chuck) QED, The Strange Theory of Light and Matter by Richard P. Feynman (Reginald) One Two Three . . . Infinity: Facts and Speculations of Science by George Gamow (Reginald) Understanding Computation: From Simple Machines to Impossible Programs by Tom Stuart (Reginald) Realm of Racket: Learn to Program, One Game at a Time! by Matthias Felleisen (Reginald) Special Offer! JSJABBERROCKS will give $5 off JavaScript Allongé by Reginald Braithwaite on Friday, August 9th through Sunday, August 11th 2013 ONLY! Next Week JavaScript Strategies at Microsoft with Scott Hanselman Transcript MERRICK:  Turns out my habit is Joe coming over to my desk and saying, [singing] “Da-na-na-na, jabber time!” [Laughter] AJ:  Nice. REG:  That behavior is always acceptable if you are dressed for the part. [Laughter] CHUCK:  Since this is pure audio, you don’t even have to be dressed. JOE:   I have a pair of parachute pants. MERRICK:  I actually record most of this show while I'm in the bathtub. [Hosting and bandwidth provided by the Blue Box Group. Check them out at BlueBox.net.]  [This episode is sponsored by Component One, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.]  [This podcast is sponsored by JetBrains, makers of WebStorm. Whether you’re working with Node.js or building the front end of your web application, WebStorm is the tool for you. It has great code quality and code exploration tools and works with HTML5, Node, TypeScript, CoffeeScript, Harmony, LESS, Sass, Jade, JSLint, JSHint, and the Google Closure compiler. Check it out at JetBrains.com/WebStorm.] CHUCK:  Hey everybody and welcome to Episode 70 the JavaScript Jabber show. This week on our panel we have Jamison Dance. JAMISON:  Hello friends. CHUCK:  Joe Eames. JOE:  Hey there. CHUCK:  AJ O’Neal. AJ:  Still coming at you almost live from San Francisco. CHUCK:  Merrick Christensen. MERRICK:  What’s up guys? CHUCK:  There we go. I’m Charles Max Wood from DevChat.TV. And we have a special guest, and that is Reg Braithwaite. REG:  Pleased to be here with you. MERRICK:  That was a real voice if I’ve ever heard one. JOE:  Yeah. Awesome. CHUCK:  No kidding. We should have you do some voice overs for us. MERRICK:  We should. CHUCK:  You’re listening to JavaScript Jabber. [Chuckles] AJ:  Say, “In a world…” [Chuckles] REG:  In a world… CHUCK:  Anyway… [Laughter] AJ:  Derailed, derailed. CHUCK:  Yeah, totally. Reg, since you’re new to the show, do you want to introduce your self briefly? REG:  Certainly. I’m a 51-year-old programmer. I got started the old-fashioned way,




java

071 JSJ JavaScript Strategies at Microsoft with Scott Hanselman

Panel Scott Hanselman (twitter github blog) Joe Eames (twitter github blog) Aaron Frost (twitter github blog) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Discussion 01:14 - Scott Hanselman Introduction Community Program Manager for Web Tools at Microsoft Azure and Web Tools ASP.NET Runtime 03:17 - Microsoft and JavaScript Microsoft Build Developer Conference Scott Hanselman: Angle Brackets, Curly Braces, One ASP.NET and the Cloud Json.NET 13:40 - The Cost of Web Development Tooling Sublime Text Visual Studio 18:17 - Libraries and Frameworks Knockout 24:14 - Innovation in Software Befunge 29:48 - Apps Supporting JavaScript Create your first Windows Store app using JavaScript (Windows) Visual Studio Express 34:14 - Windows and Internet Explorer Chakra 40:42 - Microsoft’s Attitude Towards JavaScript Scott Hanselman: Azure for the non-Microsoft Person - How and Why? 45:58 - Open Source 49:12 - asm.js 52:05 - Angle Brackets Conference Picks The Wolverine (Joe) ng-conf (Joe) Cancún (Aaron) @ngconf (Aaron) Wistia (Chuck) Mumford And Sons 'Hopeless Wanderer' Music Video (Scott) Beyoncé Joins the Short Hair Club (Scott) Next Week Screencasting: Sharing What You Know Through Video Transcript [Hosting and bandwidth provided by the Blue Box Group. Check them out at BlueBox.net.]  [This episode is sponsored by Component One, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.]  [This podcast is sponsored by JetBrains, makers of WebStorm. Whether you’re working with Node.js or building the front end of your web application, WebStorm is the tool for you. It has great code quality and code exploration tools and works with HTML5, Node, TypeScript, CoffeeScript, Harmony, LESS, Sass, Jade, JSLint, JSHint, and the Google Closure Compiler. Check it out at JetBrains.com/WebStorm.] CHUCK:  Hey everybody and welcome to Episode 71 the JavaScript Jabber show. This week on our panel, we have Joe Eames. JOE:  Hey. CHUCK:  Aaron Frost. AARON:  Hello. CHUCK:  I’m Charles Max Wood from DevChat.TV. And we have a special guest that is Scott Hanselman. SCOTT:  Hello. CHUCK:  Since you’re new to the show, do you want to introduce yourself really quickly? SCOTT:  My name is Scott Hanselman. You can learn more about me on the internet by googling for Scott. I’m in an epic battle right now with the Scott toilet paper people. You’ll find me just below Scott toilet tissue. I’ve been blogging for ten years. More than ten years, 13 years. I work at Microsoft right now. Before that I worked in finance at a company called Corillian that is now Fiserv. I’ve been building big systems on the web for as long as the web’s been around. CHUCK:  Wow. What do you do at Microsoft? SCOTT:  I work in Azure and Web Tools. I’m a program manager. I’m in charge of the experience from file new project until deployment. I call myself the PM of miscellaneous. I spend time going through that experience making sure that it doesn’t suck. My focus is on web tools but also ASP.NET Runtime and what the experience is when you deploy something into Azure. That might be everything from what’s it like editing JavaScript in Visual Studio and I’ll find some issue and go and work with the guys that own that, or it might be someone’s trying to do something in Node on Azure and that experience is not good. I’m like an ombudsman or a customer liaison. But the simplest way would be to say I’m the community PM, community program manager, for web tools at Microsoft. CHUCK:  Okay. AARON:  Cool. CHUCK:  So, is JavaScript your primary focus? SCOTT:  I would say that my primary focus is just anything that makes the web better and moves the web forward. While I work for ASP.NET and most of my work is in C#,




java

075 JSJ Maintainable JavaScript with Nicholas Zakas

Panel Nicholas C. Zakas (twitter github blog) Joe Eames (twitter github blog) AJ O’Neal (twitter github blog) Jamison Dance (twitter github blog) Merrick Christensen (twitter github) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Discussion 01:24 - Nicholas Zakas Introduction Box Maintainable JavaScript by Nicholas C. Zakas High Performance JavaScript (Build Faster Web Application Interfaces) by Nicholas C. Zakas Yahoo 02:19 - What Makes Maintainable JavaScript? Code Layout Clever Solutions (“Chicken Blood Solutions”) 04:39 - Formatting Thinking, Fast and Slow by Daniel Kahneman Broken Window Theory 07:33 - Architecture aura Nicholas Zakas: The Scalable JavaScript Application Architecture Feature Encapsulation 14:11 - 'High Performance Javascript' and the balance between short-term and long-term knowledge 19:17 - Important conventions for a team to follow Styles Mini Design Patterns Readability 26:14 - Tools & Techniques Style Guide 28:31 - Breaking the continuous integration build 31:14 - Linting JSLint 32:35 - Developing skills for architecting things Experience Personal Trait of Curiosity Component-based and Systems-based software engineers 37:52 - Architecture and Maintainability Testability Backbone.js 43:28 - Creating common conventions that will apply across projects Picks Domo (Joe) Pluralsight (Joe) Game Dev Tycoon (Joe) The Star Wars (Joe) Foundation Actionscript 3.0 Animation: Making Things Move! by Keith Peters (Merrick) ng-conf (Merrick) Kveikur by Sigur Rós (Merrick) makemeasandwich (AJ) Sleep (AJ) Jekyll Themes (Jamison) Growing Object-Oriented Software, Guided by Tests by Steve Freeman (Jamison) A Canticle For Leibowitz by Walter M. Miller Jr. (Jamison) DevChat.tv (Chuck) Thinking, Fast and Slow by Daniel Kahneman (Nicholas) StePhest Colbchella '013 - Time to Dance (Nicholas) Evolution of Music - Pentatonix (Nicholas) Next Week Meteor.js with Marcus Phillips and Fred Zirdung Transcript [Hosting and bandwidth provided by the Blue Box Group. Check them out at BlueBox.net.]  [This episode is sponsored by Component One, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.]  [This podcast is sponsored by JetBrains, makers of WebStorm. Whether you’re working with Node.js or building the frontend of your web application, WebStorm is the tool for you. It has great code quality and code exploration tools and works with HTML5, Node, TypeScript, CoffeeScript, Harmony, LESS, Sass, Jade, JSLint, JSHint, and the Google Closure Compiler. Check it out at JetBrains.com/WebStorm.] CHUCK:  Hey everybody and welcome to episode 75 of the JavaScript Jabber show. This week on our panel, we have Joe Eames. JOE:  Hey, everyone. CHUCK:  AJ O’Neal. AJ:  I can hit unmute. I'm here. CHUCK:  Jamison Dance. JAMISON:  Hello, friends. CHUCK:  Merrick Christensen. MERRICK:  Hey, guys. CHUCK:  I’m Charles Max Wood from DevChat.TV. This week, we have a special guest, that’s Nicholas Zakas. NICHOLAS:  Yup, you got it. CHUCK:  So, since you haven’t been on the show before, do you want to introduce yourself? NICHOLAS:  Sure. I'm a software engineer that is working for Box currently. I think a lot of people probably know me from the books that I've written, mostly on the topic of JavaScript and the talks that I've given also on that topic. And a lot of that relates back to my work when I was at Yahoo. I was there for about five years and was the lead on the Yahoo homepage redesign. And a lot of what I do is really just try to solve problems in real life and then share what I did with everybody else in whatever way I think is most appropriate - writing or speaking or coming on podcasts. CHUCK:  Yes, you're being modest. You have a book,




java

081 JSJ Promises for Testing Async JavaScript with Pete Hodgson

Pete Hodgson crosses over from the iPhreaks podcasts to talk with the Jabber gang about testing asynchronous Javascript with promises.




java

093 JSJ The New York Times and JavaScript with Eitan Konigsburg, Alastair Coote and Reed Emmons

The panelists discuss The New York Times and JavaScript with Eitan Konigsburg, Alastair Coote and Reed Emmons.




java

096 JSJ The Challenges of Large Single Page JavaScript Applications with Bart Wood

The panelists talk to Bart Wood about large single page JavaScript applications.




java

109 JSJ Dependency Injection in JavaScript with Vojta Jína & Misko Hevery

The panelists discuss dependency injection with Vojta Jína & Misko Hevery.




java

112 JSJ Refactoring JavaScript Apps Into a Framework with Brandon Hays

The panelists talk about refactoring JavaScript Apps Into a Framework with Brandon Hays.




java

124 JSJ The Origin of Javascript with Brendan Eich

The panelists talk to Brendan Eich, the creator of JavaScript.




java

159 JSJ Why JavaScript Is Hard

02:54 - Everyone Gets It But Me

04:06 - Tools You “Need” to Know

06:29 - Clojures

07:39 - JavaScript as “Object-Oriented” vs “Event-Oriented”

09:30 - Code That Can’t Be Serialized or Deserialized

10:49 - Clojures (Cont’d)

14:32 - The DOM (Document Object Model)

19:52 - Math Is Hard

  • IEEE754 (Floating-Point Arithmetic)

22:39 - Prototypes

25:43 - Asynchronous Programming

32:23 - Browser Environments

34:48 - Keeping Up with JavaScript

35:46 - Node

  • Nesting
  • Context Switching

42:48 - UTF-8 Conversion

44:56 - Jamison’s Stack

Check out and sign up to get new on React Rally: A community React conference on August 24th and 25th in Salt Lake City, Utah!

Picks

Jason Orendorff: ES6 In Depth (Aimee)
Cat Strollers (Aimee)
Stephano Legacy of the Void (Joe)
A Gentleman's Guide to Love and Murder (Joe)
Gregor Hohpe: Your Coffee Shop Doesn’t Use Two-Phase Commit  (AJ)
Firefox OS (AJ)
Flame (AJ)
OpenWest 2015 (AJ)
801 Labs Hackerspace (AJ)
Stack Overflow Careers (AJ)

Dota 2 (Jamison)
Beats, Rye & Types Podcast (Jamison)
JS Remote Conf Talks (Chuck)

Workflowy (Chuck)




java

168 JSJ The Future of JavaScript with Jafar Husain

03:04 - Jafar Husain Introduction

03:29 - The Great Name Debate (ES6, ES7 = ES2015, ES2016!!)

05:35 - The Release Cycle

  • What This Means for Browsers

08:37 - Babel and ECMAScript

09:50 - WebAssembly

13:01 - Google’s NACL

13:23 - Performance > Features?

20:12 - TC39

24:22 - New Features

  • Decorators
    • Performance Benefit?

28:53 -Transpilers

34:48 - Object.observe()

37:51 - Immutable Types

45:32 - Structural Types

47:11 - Symbols

48:58 - Observables

52:31 - Async Functions

57:31 - Rapid Fire Round - When New Feature Will Be Released in ES2015 or ES2016

  • let - 15
  • for...of - 15
  • modules - 15
  • destructuring - 15
  • promises - 15
  • default function argument expressions - 15
  • asyncawait - 16

Picks

ES6 and ES7 on The Web Platform Podcast (AJ)
Binding to the Cloud with Falcor Jafar Husain (AJ)
Asynchronous JavaScript at Netflix by Jafar Husain @ MountainWest Ruby 2014 (AJ)
Let's Encrypt on Raspberry Pi (AJ)
adventures in haproxy: tcp, tls, https, ssh, openvpn (AJ)
Let's Encrypt through HAProxy (AJ)
Mandy's Fiancé's Video Game Fund (AJ)
The Murray Gell-Mann Amnesia Effect (Dave)
The Majority Illusion (Dave)
[Egghead.io] Asynchronous Programming: The End of The Loop (Aimee)
Study: You Really Can 'Work Smarter, Not Harder' (Aimee)
Elm (Jamison)
The Katering Show (Jamison)
Sharding Tweet (Jamison)
The U.S. Women's National Soccer Team (Joe)
mdn.io (Joe)
Aftershokz AS500 Bluez 2 Open Ear Wireless Stereo Headphones (Chuck)
Autonomy, Mastery, Purpose: The Science of What Motivates Us, Animated (Jafar)
Netflix (Jafar)
quiescent (Jafar)
Clojurescript (Jafar)




java

188 JSJ JavaScript Code Smells with Elijah Manor

Check out JS Remote Conf!

 

02:22 - Elijah Manor Introduction

04:49 - What is a “Code Smell”?

10:21 - Copy/Paste Code Error

13:11 - Using ES6 to Eliminate Code Smells

15:48 - Refactoring Case Statements

21:29 - Juniors and Code Smells

  • Code Reviews

27:29 - Isomorphic Code

31:12 - Framework Code Smells

33:47 - Identifying New Code Smells

36:33 - When Code Smells are OK

39:10 - Why use parameters?

Picks

Terms And Conditions May Apply (AJ)
Nodevember (Aimee)
Developer Tea (Aimee)
Jake Shimabukuro (Joe)
Screeps (Joe)
react-styleguide-generator (Elijah)
react-styleguidist (Elijah)
The Phantom Menace - What it Should Have Been (AJ)
Attack of the Clones - What it Should Have Been (AJ)




java

194 JSJ JavaScript Tools Fatigue

JS Remote Conf starts tomorrow! Get your ticket TODAY!

 

03:59 - JavaScript Tools Fatigue

09:25 - Are popular technologies ahead of public consumability?

12:53 - Adopting New Things / Churn Burnout

18:02 - Non-JavaScript Developers and Team Adoption

30:49 - Is this the result of a crowdsourced design effort?

35:44 - Human Interactions

45:00 - Tools

47:03 - How many/which of these tools do I need to learn?

Picks

Julie Evans: How to Get Better at Debugging (Jamison)
Totally Tooling Tips: Debugging Promises with DevTools (Jamison)
Making a Murderer (Jamison)
Scott Alexander: I Can Tolerate Anything Except the Outgroup (Jamison)
@SciencePorn (Dave)
postcss (Aimee)
Cory House: The Illogical Allure of Extremes (Aimee)
Kerrygold Natural Irish Butter (Aimee)
Star Wars (Joe)
@iammerrick (Joe)
Greg Wilson: What We Actually Know About Software Development, and Why We Believe It's True (Joe)
The U.S. Military (Joe)

Operation Code (Aimee)
Ruby Rogues Episode #184: What We Actually Know About Software Development and Why We Believe It's True with Greg Wilson and Andreas Stefik (Chuck)
Serial Podcast (Chuck)