nc

The World Today: Concepts and Regions in Geography, 8th Edition


 

In the 8th edition of this market-leading title, The World Today continues to break new ground in the interpretation and teaching of world regional geography. The text explains the contemporary world’s geographic realms in terms of their natural environments and human dimensions in a clear and concise fashion. The authors look at the ways people have organized their living space, adapted to changing social as well as environmental circumstances, and



Read More...




nc

Encyclopedia of Water: Science, Technology, and Society, 5 Volume Set


 

A peer reviewed, comprehensive encyclopedia that reflects the current state of water science and engineering from multidisciplinary global viewpoints

Water quantity and quality are becoming increasingly urgent environmental issues. To meet the growing water demands of our expanding global population, professionals are turning to nontraditional sources and technologies. This expansive, multidisciplinary reference work contains hundreds of articles that



Read More...




nc

On Cancelable Promises

Update
The awesome Lie function got improved and became an official module (yet 30 lines of code thought). Its name is Dodgy, and it's tested and even more awesome!


Ifeverydevelopertalksaboutsimilarissues with Promises, maybe we should just drop our "religion" for an instant and meditate about it ...

Not today though, today is just fine

We've been demanding from JS and Web standards to give us lower level APIs and "cut the crap", but we can do even more than that: simply solve our own problems whenever we need, and "cut our own crap" by ourselves and for our own profit, instead of keep moaning without an outcome.
Today, after reading yet another rant about what's missing in current Promise specification, I've decided to write a very simple gist:


After so many discussions and bikeshead about this topic, I believe above gist simply packs in its simplicity all good and eventually bad intents from any voice of the chorus I've heard so far:
  1. if we are in charge of creating the Promise, we are the only one that could possibly make it abortable and only if we want to, it's an opt in rather than a default or a "boring to write" subclass
  2. it's widely agreed that cancellation should be rather synonymous of a rejection, there's no forever pending issue there, just a plain simple rejection
  3. one of the Promise strength is its private scope callback, which is inevitably the only place where defining abortability would make sense. Take a request, a timer, an event handler defined inside that callback, where else would you provide the ability to explicitly abort and cleanup the behavior if not there?
  4. being the callback the best pace to resolve, reject, and optionally to abort, that's also the very same place we want to be sure that if there was a reason to abort we can pass it along the rejection, so that we could simply ignore it in our optionally abort aware Promises, and yet drop out from any other in the chain whenever the rejection occurs or it's simply ignored
  5. the moment we make the promise malleable from the outer world through a p.abort() ability, is also the very same moment we could just decide to resolve, or fully fail the promise via p.resolve(value) or p.reject(error)
As example, and shown in the gist itself, this is how we could opt in:

var p = new Lie(function (resolve, reject, onAbort) {
var timeout = setTimeout(resolve, 1000, 'OK');
// invoking onAbort will explicit our intent to opt-in
onAbort(function () {
clearTimeout(timeout);
return 'aborted'; // will be used as rejected error
// it could even be undefined
// so it's easier to distinguish
// between real errors and aborts
});
});
After that, we can p.abort() or try other resolve or reject options with that p instance and track it's faith:

p.then(
console.log.bind(console),
console.warn.bind(console)
).catch(
console.error.bind(console)
);
Cool, uh? We have full control as developers who created that promise, and we can rule it as much as we like when it's needed ... evil-laugh-meme-here

Cooperative code

In case you are wondering what's the main reason I've called it Lie in the first place, it's not because a rejected Promise can be considered a lie, simply because its behavior is not actually the one defined by default per each Promise.
Fair enough for the name I hope, the problem might appear when we'd like to ensure our special abortable, resolvable, rejectable own Promise, shouldn't be passed around as such. Here the infinite amount of logic needed in order to solve this problem once for all:

var toTheOuterWorld = p.then(
function (data) {return data},
function (error) {return error}
);
// or even ...
var toTheOuterWorld = Promise.resolve(p);
That's absolutely it, really! The moment we'd like to pass our special Promise around and we don't want any other code to be able to mess with our abortability, we can simply pass a chained Promise, 'cause that's what every Promise is about: how cool is that?

// abortable promise
var cancelable = new Lie(function (r, e, a) {
var t = setTimeout(r, 5000, 'all good');
a(function () { clearTimeout(t); });
});

// testing purpose, will it resolve or not?
setTimeout(cancelable.reject, 1000, 'nope');
// and what if we abort before?
setTimeout(cancelable.abort, 750);



// generic promise, let's log what happens
var derived = cancelable.then(
function (result) { console.log('resolved', result); },
function (error) { error ?
console.warn('rejected', error) :
console.log('ignoring the .abort() call');
}
).catch(
function (error) { console.error('cought', error); }
);

// being just a Promise, no method will be exposed
console.log(
derived.resolve,
derived.reject,
derived.abort
);

Moaaar lies

If your hands are so dirty that you're trying to solve abort-ability down the chain, don't worry, I've got you covered!

Lie.more = function more(lie) {
function wrap(previous) {
return function () {
var l = previous.apply(lie, arguments);
l.resolve = lie.resolve; // optional bonus
l.reject = lie.reject; // optional bonus
l.abort = lie.abort;
return Lie.more(l);
};
}
if (lie.abort) {
lie.then = wrap(lie.then);
lie.catch = wrap(lie.catch);
}
return lie;
};
We can now chain any lie we want and abort them at any point in time, how cool is that?

var chainedLie = new Lie(function (res, rej, onAbort) {
var t = setTimeout(res, 1000, 'OK');
onAbort(function (why) {
clearTimeout(t);
return why;
});
})
.then(
console.log.bind(console),
console.warn.bind(console)
)
.catch(
console.error.bind(console)
);

// check this out
chainedLie.abort('because');
Good, if you need anything else you know where to find me ;-)
How to opt out from lies again?

var justPromise = Promise.resolve(chainedLie);
OK then, we've really solved our day, isn't it?!

As Summary

Promises are by definition the returned or failed value from the future, and there's no room for any abort or manually resolved or rejected operation in there.
... and suddenly we remind ourselves we use software to solve our problems, not to create more, so if we can actually move on with this issue that doesn't really block anyone from creating the very same simple logic I've put in place in about 20 well indented standard lines, plus extra optional 16 for the chainable thingy ... so what are we complaining about or why do even call ourselves developers if we get stuck for such little effort?
Let's fell and be free and pick wisely our own footgun once we've understood how bad it could be, and let's try to never let some standard block our daily job: we are all hackers, after all, aren't we?




nc

module.import(async)

Using a de-facto standard like CommonJS is for modules, I've implemented a Promise based import after TC39 proposal, which also accepts promises based module.exports.

Backward compatible and deadly simple, this proposal needs some adoption in order to push it further at TC39 or NodeJS.

Don't miss the post!




nc

Mapping the country of regions: the Chorographic Commission of nineteenth-century Colombia / Nancy P. Appelbaum, the University of North Carolina Press, Chapel Hill

Hayden Library - GA693.7.A1 A77 2016




nc

Wildlife tourism, environmental learning and ethical encounters: ecological and conservation aspects / edited by Ismar Borges de Lima, Ronda J. Green

Online Resource




nc

Frederick de Wit and the first concise reference atlas / George Carhart

Hayden Library - GA923.6.W57 C37 2016




nc

Geographical information systems theory, applications and management: second International Conference, GISTAM 2016, Rome, Italy, April 26-27, 2016, Revised selected papers / Cédric Grueau, Robert Laurini, Jorge Gustavo Rocha (eds.)

Online Resource




nc

Spatial big data science: classification techniques for Earth observation imagery / Zhe Jiang, Shashi Shekhar

Online Resource




nc

Exploring Greenland: cold war science and technology on ice / Ronald E. Doel, Kristine C. Harper, Matthias Heymann, editors

Hayden Library - G743.E96 2016




nc

Basic Principles of Topography by Blagoja Markoski

Online Resource




nc

Geospatial technologies for all: selected papers of the 21st AGILE Conference on Geographic Information Science / Ali Mansourian, Petter Pilesjö, Lars Harrie, Ron van Lammeren, editors

Online Resource




nc

The technocratic Antarctic: an ethnography of scientific expertise and environmental governance / Jessica O'Reilly

Dewey Library - G877.O74 2017




nc

Understanding GPS/GNSS: Principles and Applications, Third Edition / by Elliott D. Kaplan, Christopher J. Hegarty

Online Resource




nc

The concise dictionary of world place-names / John Everett-Heath

Online Resource




nc

Transnational tourism experiences at Gallipoli / Jim McKay

Online Resource




nc

Exploration of subsurface Antarctica: uncovering past changes and modern processes / edited by M.J. Siegert, S.S.R. Jamieson and D.A. White

Hayden Library - G860.E97 2018




nc

Geo-Spatial Knowledge and Intelligence: 5th International Conference, GSKI 2017, Chiang Mai, Thailand, December 8-10, 2017, Revised Selected Papers. / edited by Hanning Yuan, Jing Geng, Chuanlu Liu, Fuling Bian, Tisinee Surapunt

Online Resource




nc

Geo-Spatial Knowledge and Intelligence: 5th International Conference, GSKI 2017, Chiang Mai, Thailand, December 8-10, 2017, Revised Selected Papers. / edited by Hanning Yuan, Jing Geng, Chuanlu Liu, Fuling Bian, Tisinee Surapunt

Online Resource




nc

GIS and the social sciences: theory and applications / Dimitris Ballas, Graham Clarke, Rachel S. Franklin and Andy Newing

Rotch Library - G70.212.B35 2018




nc

The age of reconnaissance / J.H. Parry

Online Resource




nc

Proceedings of the Tiangong-2 remote sensing application conference: technology, method and application / editors, Yidong Gu, Ming Gao and Guangheng Zhao

Online Resource




nc

WebGIS for Disaster Management and Emergency Response Rifaat Abdalla, Marwa Esmail

Online Resource




nc

Information and Communication Technologies in Tourism 2019: Proceedings of the International Conference in Nicosia, Cyprus, January 30--February 1, 2019.

Online Resource




nc

Advances in Remote Sensing and Geo Informatics Applications: Proceedings of the 1st Springer Conference of the Arabian Journal of Geosciences (CAJG-1), Tunisia 2018 / Hesham M. El-Askary, Saro Lee, Essam Heggy, Biswajeet Pradhan, editors

Online Resource




nc

GIScience teaching and learning perspectives / Shivanand Balram, James Boxall, editors

Online Resource




nc

The new map of empire: how Britain imagined America before independence / S. Max Edelson

Hayden Library - GA401.E36 2017




nc

Arctic Triumph: Northern Innovation and Persistence / Nikolas Sellheim, Yulia V. Zaika, Ilan Kelman, editors

Online Resource




nc

Fostering transformative research in the geographical sciences / Committee on Identifying Transformative Research in the Geographical Sciences; Geographical Sciences Committee, Board on Earth Sciences and Resources, Division on Earth and Life Sciences

Online Resource




nc

Cycling and motorcycling tourism: an analysis of physical, sensory, social, and emotional features of journey experiences / Anna Scuttari

Online Resource




nc

Encyclopedia of GIS / editors, Shashi Shekhar, Hui Xiong, Xun Zhou

Online Resource




nc

Terrae incognitae: modos de pensar y mapear geografías desconocidas / Carla Lois

Rotch Library - G70.L595 2018




nc

Geographical information systems theory, applications and management: 4th international conference, GISTAM 2018, Funchal, Madeira, Portugal, March 17-19, 2018: revised selected papers / Lemonia Ragia, Cédric Grueau, Robert Laurini (eds.)

Online Resource




nc

Geographical information systems theory, applications and management: third international conference, GISTAM 2017, Porto, Portugal, April 27-28, 2017: revised selected papers / Lemonia Ragia, Robert Laurini, Jorge Gustavo Rocha (eds.)

Online Resource




nc

Geographical design: spatial cognition and geographical information science / Stephen C. Hirtle

Online Resource




nc

Earth observations and geospatial science in service of sustainable development goals: 12th International Conference of the African Association of Remote Sensing and the Environment / Souleye Wade, editor

Online Resource




nc

Close Up at a Distance: Mapping, Technology, and Politics.

Online Resource




nc

Advances in Tourism, Technology and Smart Systems: Proceedings of ICOTTS 2019 / Álvaro Rocha, António Abreu, João Vidal de Carvalho, Dália Liberato, Elisa Alén González, Pedro Liberato, editors

Online Resource




nc

Experiencing Persian heritage: perspectives and challenges / editors, Antonia Correia, Metin Kozak, Ana Isabel Rodrigues

Rotch Library - G155.I65 E97 2019




nc

Mapping the nation: GIS making a difference now - locally, nationally, globally: GIS inspiring what's next - accelerating digital transformation.

Rotch Library - G70.212.M37 2019




nc

Beyond the map: unruly enclaves, ghostly places, emerging lands and our search for new utopias / Alastair Bonnett

Hayden Library - G123.B66 2018




nc

Travel and tourism: sustainability, economics, and management issues: proceedings of the Tourism Outlook Conferences / İnci Oya Coşkun, Norain Othman, Mohamed Aslam, Alan Lew, editors

Online Resource




nc

Historical geography, GIScience and textual snalysis: landscapes of time and place / Charles Travis, Francis Ludlow, Ferenc Gyuris, editors

Online Resource




nc

Changing Age and Career Concepts in the Austrian Banking Industry: A Case Study of Middle-Aged Non-Managerial Employees and Managers.

Online Resource




nc

Encyclopedia of business and professional ethics / editors, Deborah C. Poff, Alex C. Michalos

Online Resource




nc

Effective Virtual Project Teams: A Design Science Approach to Building a Strategic Momentum.

Online Resource




nc

Coherency management: an alternative to CSR in a changing world / Ivan Hilliard

Online Resource




nc

Encyclopedia of sustainable management edited by Samuel Idowu, René Schmidpeter, Nicholas Capaldi, Liangrong Zu, Mara Del Baldo, Rute Abreu

Online Resource




nc

Industry 4.0 from the MIS perspective / Sevinc Gülsecen, Zerrin Ayvaz Reis, Murat Gezer (eds.)

Dewey Library - HD45.I5328 2019




nc

International Governance and Risk Management

Online Resource