[0] https://www.nytimes.com/2023/01/23/technology/tech-interest-...
934 karma · joined February 11, 2012
[0] https://www.nytimes.com/2023/01/23/technology/tech-interest-...
So, this article is definitely not generic. Maybe, if you're reading at the bottom of the article, you can call it generic, because the advice for future projects is good. But otherwise, it's spot on. I can only hope that the Angular dev team sees this blog post and incorporates the recommendations into version 2.
Show HN: When is good time to cut the crap
Can Snowden be targeted using the Soundcloud API
MIT's artificial leaf is ten times more income from Android than from Windows ’95
Free online version of Apache HTTP Server released
What the smartest people do on the Moon
Sorry, this blog post is not non-linear
Supreme Court to allow Google to sue me into acquiring. Help
Lawsuit Filed To Prove Happy Birthday Is In The Middle Of A Terrible Blubble
Chrome now the most effective thing you did to improve Python for Pythonists
IBM to Acquire a Domain Name?
My husband is a JavaScript library for capturing input
Youporn.com is now MIT licensed
* Ability to move in a fast paced environment, at a speed of 180 mph or greater.
* Demonstrated physical capacity to produce calefaction directed from eyeballs, at or exceeding 400 degrees Fahrenheit.
* Signed note from esteemed scientist showing capability for producing X-rays (preferably 5 nanometer wavelength) from eyeballs or eye sockets
* Affidavits testifying to eidetic memory.
* Ability to physically resist and rebuff projectiles, including but not limited to arrows, baseballs, rocket propelled grenades, bowling balls, and bullets between the range of 1 and 50 caliber.
* Established reputation for instantly understanding and speaking any language sufficiently established by a human culture, after initial exposure.
* Distinguishing characteristics: Faculty for achieving flight, and resourcefulness.
Are these job requirements impossible? Absolutely not! They are laid out explicitly, so the list is perfectly reasonable. Being up front makes all the difference here.
[1] http://blogs.msdn.com/b/oldnewthing/archive/2003/10/15/55296...
It's really tragic how little Arizona higher education is supported, given their accomplishments.
That said, I think it is pretty rude to tell me after showing my score that the quiz would, and I quote, "not buy [me] on DVD."
Wow, this is so wrong I am annoyed by it. The Internet is not "anonymous" (it really isn't, for the most part) because someone designed it that way. You can read the design rules set out by DARPA and see that they were concerned about infrastructure above all else [1]. The fundamental goal was the multiplexing of many different networks. The top three secondary goals were:
1. Network resilience 2. Multiple communication types 3. Support for different network types
Anonymity was not part of the design of the Internet--period.
[1] http://ccr.sigcomm.org/archive/1995/jan95/ccr-9501-clark.pdf
You're right that 28 lines is pretty ridiculous, but it's because I never abstracted out that code. The playlist code is some of the ugliest in that project, because I got pretty lazy with it. I know it's terrible. The console logging stuff is part of that.
Q actually allows exceptions to cause promise rejections, which is both a nifty feature and a potential curse (e.g. throwing an exception before releasing a resource).
I like the changes you propose (not considering testing), but with slightly different implementation. the DbCommand should be creating its own deferreds, rather than accepting one as a parameter. This kind of promise handling is best left up to DbCommand to implement, rather than the caller. In Q it's easy to chain promises, like so:
Q.fcall(someFunction).then(function(result) {
return functionThatReturnsAPromise();
}).then(function(secondResult) {
console.log(secondResult);
}).done();
Also, in a proper redesign, Q's denodeify function can change the whole flow of the execute function entirely: DbCommand.prototype.execute = function(query, onComplete) {
var self = this;
Q.denodeify(dbConnectionPool.acquire).then(function(connection) {
self.connection = connection;
return Q.denodeify(connection.query);
}).then(function(rows) {
return onComplete(rows);
}).finally(function() {
self.connection && dbConnectionPool.release(self.connection);
}).done();
};
Q's denodeify call works with Node.js callbacks which follow the convention that the error is the first argument, and the result all others. denodeify then converts the error into an argument for any calls to Q.fail. Any uncaught errors will be thrown after done() is called.However, I am not sold on the idea of creating a prototype for DB commands. There's no state that needs to be held, and the code is abstract enough without introducing a prototype.
Again, thanks for the code review. The playlist DB code needs a lot of refactoring, since right now there's too much repetition I've been too lazy to fix. If you want to talk some more, feel free to email me.
Promises make async code easy to manage, even at scale. Each API request gets its own promise. What happens inside that promise doesn't matter, as long as it returns a result or an error. If talking to the API takes one request or two, it does not matter with promises. We can abstract these API requests in such a way that even if document retrieval is a multi-step process or a one-step process for each document source, the collation process can know nothing about the retrieval process to work.
In other words, promises allow us to separate concerns. Document retrieval is one concern, collation another. Promises, by abstracting asynchronous control flow into synchronously appearing objects, allow us to write simple programs at higher levels. Separating concerns makes the server easier to test and easier to extend.
If you want to see how I've used promises, you can take a look at my work on Github [2].
Because the developer is storing passwords in plaintext, and he wants to save database space.
Now, this is not a good reason, but it is a reason nevertheless. Please note that you should never, ever, ever, ever store passwords in plaintext.
Address
|-> US
|-> state
|-> UK
|-> state
An alternative would be for country-specific generators to take a country code as an argument. I am not an experienced API designer, though, so take my comments with a heaping of salt.UNITY_VALUE? Seriously? The agile approach would be to contact the customer, ask them what kind of user story they need to interact with the number 1, e.g. "As an admin, I want to interact with the number that is the square root of 1, which is also the product of i^4, and the multiplicative identity." There may be some back and forth on this, since regular users (not just admins) will want to work with the number prescribed above.
Then, you need to draw up a quick prototype. We don't need any crap like UNITY_VALUE polluting our beautiful agile code. Instead we'll declare a constant called ONE somewhere. (It doesn't matter where you put it, since we'll probably just Martin Fowler that code anyway in 10 weeks--actually, make that 2.)
Then you go back to the customer, show them the prototype. In my opinion, it helps to show them Euler's identity or the multiplicative identity just to assure them it works, in case they doubt it. (They probably will doubt it, since all this agile process stuff looks like automagic to the unenlightened morons we call customers.)
Then move on. Done. Bam. No need for this UNITY_VALUE junk. No additional libraries. Agile magic.