"javascript" entries

Peter Hoddie on JavaScript for embedded systems

The O’Reilly Hardware Podcast: Hardware abstraction, scripting languages, and user experience.

Subscribe to the O’Reilly Hardware Podcast for insight and analysis about the Internet of Things and the worlds of hardware, software, and manufacturing. Find us on TuneIn, Stitcher, iTunes, SoundCloud, RSS.

350px-4312424420_cb337fb5c7_o

This will be a breakout year for JavaScript on embedded systems. Our guest on the Hardware Podcast this week is Peter Hoddie, who founded Kinoma, which makes software and hardware for building JavaScript-powered prototypes. Previously he was one of the original developers of QuickTime at Apple.

Computing power has become so inexpensive, and the JS developer community so large, that the accessibility and fast development times of JavaScript will outweigh the efficiency advantages of C and assembly for all but fairly specialized projects.

Discussion points:

  • Scratch, which begat Blockly, which begat KinomaJS Blocks, which can be used to program the Create embedded platform.
  • Transitioning from software development to hardware development.
  • The importance of developing hardware that is flexible, modular and abstracted. “Why should you throw out your hardware because the software is obsolete?” Hoddie asks.
  • Tools: Hoddie swears by profilers, including Apple’s Instruments and the Kinoma Studio profiler
  • Writing your own JavaScript engine—in this case, Kinoma’s XS6

Read more…

Four short links: 26 November 2015

Four short links: 26 November 2015

Mozilla Search, Web Dependencies, Systems and Power, and Alphabet Structure

  1. Firefox Leaves Google’s Money Behind (CNET) — regional deals with other search engine companies, notably Yahoo in the United States, Baidu in China and Yandex in Russia.
  2. Managing Performance of Third-Party Scripts — in the words of Tammy Everts, A typical web page contains 75+ 3rd-party calls, which means 75+ potential webperf SPOFs.
  3. How Change Happens — draft of a book with a “systems and power” approach. Consultation period ends December 10, so get in fast if you’re interested. (via Duncan Green)
  4. More on Alphabet (NY Times blog) — G charging its Alphabet siblings for services like HR, mapping tech, compute, etc. Paging Ronald Coase! Ronald Coase to Finance!
Four short links: 19 November 2015

Four short links: 19 November 2015

Javascript Charting, Time-Series Database, Postgresql Clustering, and Organisational Warfare

  1. plotly.js — open source Javascript charting library. See the announcement.
  2. Heroic — Spotify’s time-series database, built on Cassandra and Elasticsearch. See the announcement.
  3. Yoke — high-availability Postgresql cluster with automated cluster recovery and auto-failover.
  4. Ten Graphs on Organisational Warfare — Simon Wardley in a nutshell :-)
Four short links: 16 November 2015

Four short links: 16 November 2015

Hospital Hacking, Security Data Science, Javascript Face-Substitution, and Multi-Agent Systems Textbook

  1. Hospital Hacking (Bloomberg) — interesting for both lax regulation (“The FDA seems to literally be waiting for someone to be killed before they can say, ‘OK, yeah, this is something we need to worry about,’ ” Rios says.) and the extent of the problem (Last fall, analysts with TrapX Security, a firm based in San Mateo, Calif., began installing software in more than 60 hospitals to trace medical device hacks. […] After six months, TrapX concluded that all of the hospitals contained medical devices that had been infected by malware.). It may take a Vice President’s defibrillator being hacked for things to change. Or would anybody notice?
  2. Cybersecurity and Data Science — pointers to papers in different aspects of using machine learning and statistics to identify misuse and anomalies.
  3. Real-time Face Substitution in Javascript — this is awesome. Moore’s Law is amazing.
  4. Multi-Agent Systems — undergraduate textbook covering distributed systems, game theory, auctions, and more. Electronic version as well as printed book.

Blocked!

Will content-blocking change the Web?

tree-8810_620
“No one ever turns off JavaScript any more.” I remember when I first believed that, probably around 2007. The growth of Ajax had meant that more people were actually losing content if they turned off JavaScript. From what I could tell, most of the few folks still blocking JavaScript surrendered pretty quickly.

I don’t believe that any more, though, thanks to advertising and the doors that blocking advertising has opened.

While a key part of the last decade’s Web conversation has been performance, the walled gardens are taking advantage of our failure to deliver performance to make their own promises. Facebook’s Instant Articles offer a way for publishers to use the (relative) certainty of Facebook delivery, while Apple took a more direct route for demanding performance: blocking advertisements, and more.
Read more…

Building APIs with Swagger

Designing and coding APIs in Node.js.

plugs

Getting an API design right demands far more than just figuring out which calls should do what. Public APIs — APIs meant to be used by people other than their creators — present a special set of challenges that can inform all API design. Even private APIs often find themselves with unexpected users, and can last far longer than was planned. Apigee faced the special challenge of creating a marquee API, an API for managing its APIs.

What comes first? The API or the code? Who is the API really for, and how important is the long-term maintenance of the API? Where does documentation fit? Answer these questions, and you can find the right approach.

Read more…

Learning the Web

Finding a gentle entry to a big space

html5_fundamentals

The Web welcomes, but it’s awfully big. While HTML, CSS, and JavaScript may all be appropriate entry points for newcomers who want to create, finding a solid starting point can be complicated. Social media has minimized the level of HTML and Web knowledge people need to start contributing, but when it’s time to make the jump, the Web offers perhaps too many options.

Part of the challenge is that HTML, CSS, and JavaScript may be the marquee technologies, but they’re not actually what hosts a website or app. Setting up a site requires an additional set of technologies, from domain names to hosting to web server choices. Setting up a site – long before you get to packaging an app! – requires mastering an additional technical toolset and vocabulary that will help you navigate where you need to put your projects. Our free report, Getting Started with the Web, provides the core foundations beginners need.

Those aren’t the only barriers, though. Read more…

Renaming isomorphic JavaScript?

What you need to know to make an informed choice.

Abbott and Costello performing "Who's on First?"

Abbott and Costello performing “Who’s on First?”

Abbott and Costello’s signature wordplay sketch “Who’s on First?” is one of the most renowned comedic routines of all time. Trying to describe the routine here will do it little justice, you’ll just have to watch it yourself. As funny as it may be, the sketch reveals a crucial fact: names are important. Good names should be self-explanatory, precise and reveal intent. Bad names leave people confused and aggravated and should be avoided at all cost. When we write code, we must always think about variable names, function names, file names, etc. But naming things is hard. Phil Karlton probably said it best: “There are only two hard things in Computer Science: cache invalidation and naming things.”

Since Node.js was first released in 2009, many developers have started discussing and implementing ways to share JavaScript code between the web application server and the browser. This sharing of JavaScript code allows for assembling web pages on either the client or server, with the benefits of faster initial page load times and improved search engine optimization. The name of this approach was coined by Charlie Robbins and later popularized by Spike Brehm as “isomorphic” JavaScript. Such applications are isomorphic in the sense that they take on equal (ἴσος: isos) form or shape (μορφή: morphe) regardless of which environment they are running on, be it the browser or the server.

Read more…

Four short links: 4 September 2015

Four short links: 4 September 2015

Next President, Robotic Drivers, Vintage Graphics, and Javascript Scheduling

  1. Lessig for President — it’s time.
  2. Is a Cambrian Explosion Coming for Robotics? (PDF) — interesting list of drivers, including wireless tech, battery efficiency, and worldwide data storage.
  3. How Oldschool Graphics Worked (YouTube) — video series on how ’80s computer graphics effects were built. (via BoingBoing)
  4. Tasks, Microtasks, Queues, and Schedules (Jake Archibald) — today’s dose of javascript scheduling headache.

CSS fundamentally transforms

Enabling the creation of maintainable sites and apps that look great across a variety of different devices and contexts.

css_lp_620

Choose your Learning Path. Our new Learning Paths will help you get where you want to go, whether it’s learning a programming language, developing new skills, or getting started with something entirely new.

CSS is different. Cascading Style Sheets provide a text-based way to describe what web pages should look like, but it isn’t a programming language and it relies on HTML document structures as a foundation. You need to have a grasp of HTML before you start CSS, but CSS doesn’t look anything like HTML. Nor does it look like JavaScript, the most common programming language on the Web. Whatever your background, getting comfortable with CSS’ unique approach can take some work.

CSS’ declarative model can be uniquely efficient, but requires an understanding not only of the features you want to use but the approach you want to take in decorating a document tree. That means understanding the document tree (and there may be many variations as you apply the same style sheet to multiple documents), the selectors used to identify points on the tree, the cascade that resolves conflicts among selectors, and the properties applied to that tree. Of course, the properties interact with each other and a shared model, so you’ll need to understand how the properties how to make those interactions produce your vision.
Read more…