Promisify, or (as I prefer to) just "return new Promise((resolve, reject) => { nonPromisedStuff(...) })"?
> There are still some other cases where the mess of brackets is overkill, other than callback hell.
Like bad coding style?
3,469 karma · joined November 15, 2010
Promisify, or (as I prefer to) just "return new Promise((resolve, reject) => { nonPromisedStuff(...) })"?
> There are still some other cases where the mess of brackets is overkill, other than callback hell.
Like bad coding style?
Do you know much about Hacker News? Justify your opinion or don't bring it here.
How so? What exactly do you think is more difficult about this in node than in other languages or frameworks? Is there something you would recommend as a better alternative?
As much as I like developing in C for fun, it's not a good pragmatic choice (unsafe, verbose, you don't need direct memory access to build an application like this one). Nor is bash, unless you think archaic syntax, primitive control flow, and a lack of modern language features are good things. If you'd suggest something like Python, it's basically exactly the same as node in terms of how high level it is, but (anecdotally) the package ecosystem is much richer in node and npm is easier to use than pip.
It's almost like people think because JavaScript started in browsers it should stay there and any other use case is somehow wrong or a hack. But ECMAScript is an open scripting language standard and has absolutely nothing to do with the DOM, or alert()s, or onclicks.
I write a lot of Java and C++ for pragmatic, work-related reasons, but if I need to write a command line application quickly I'll always come back to node. It's just so damn fast to develop with, and nearly everything I need is one npm install away.
while (true) //Set CPU in Infinite loop DON'T REMOVE THIS ELSE I'll KILL YOU (^ . ^)
combined with things like your "How to contribute" section requiring that anyone wanting to contribute is "dedicated", are frankly going to put anyone off wanting to get involved with this. It also doesn't reflect well on your maturity as a developer.Have you tried Xubuntu? It fills the gap that Ubuntu used to, and it's my go-to desktop OS now (apart from on my MacBook because only OS X is usable on high DPI displays). I've also installed it for non-technical friends and family and they've found it much more familiar than recent Windows versions.
In an age when the family computer is just as likely to be running Android or iOS, I think the Linux desktop has a niche and we need to start evangelizing it again. Even for the typical home user it feels more powerful than ever when you compare it to such "appliance" operating systems, which Windows and OS X seem determined to become.
Have you ever used an installer? Because that's a binary blob.
What have you been doing with it? Even just running a configure script is very noticeably slower than on Linux or OS X. You can actually see the pauses while it executes each test binary.
- Expect not to be able to SSH into your machine, for example when you really need to remotely make that git push you forgot before you left work.
- Expect either a very slow unix emulation through Cygwin, or a very glitchy one through the new Ubuntu subsystem for Windows.
- Expect installing software to be a royal PITA, and expect to start trusting binary blobs from random vendors because that's just how software is delivered on Windows. Expect every single piece of software to have its own update system, each of which will notify you separately when updates are available and have their own varying degrees of reliability in performing the update.
- On Windows 10 you can not permanently install unsigned drivers even if you really, really want to. The closest you can get is booting up in a one time development mode which is disabled the next time you reboot, or enabling a test mode which watermarks your screen. Very annoying if you have esoteric or bespoke hardware, and I don't like being told what I can and can't do on my own system.
Other than that, my major issues - common to Windows and every linux DE I've tried - were with running on my MacBook with retina (high DPI) display. It's a 1/3 chance for a given piece of software whether it will gracefully support the higher pixel density, will display as a tiny window with unreadable text, or a combination of both. Lack of smooth zoom and scrolling with the trackpad was also annoying, though not a showstopper.
How does that work? Does the carrier have to support each new brand of phone?
I don't think we have a system like that here in the UK. I have an iPhone 6 paid for with a monthly contract, but I was using a ~2002 Nokia feature phone recently while it was away for repair.
When I first turned off the compositor, even just dragging a window around the screen was an amazing experience. I now have it disabled everywhere, and I much prefer the occasional afterimage trail than adding a noticeable rendering delay to everything for the sake of a semitransparent terminal.
However, in academia, the "prestige" of the journals you have published to is hugely important. Good journals, in theory, are more selective about what they publish, so the assumption is that if you have publications in a good one you must have done more groundbreaking research. To an academic, this is the kind of thing that affects whether you get grants, whether you get paid more, whether you can get a job elsewhere.
Some journals are pretty much talked about in hushed whispers, like "that PhD student got an ___ paper in their first year, they must be some kind of genius". In reality, research tends to be more about who you know, what kind of work you're doing, and whether you're in the right place at the right time.
> HacBook Elite has the same hardware specs as a 2013 MacBook Pro, for 1/3 the price.
The "HacBook":
1600x900 display
"Up to" 8 GB RAM
Sandy Bridge i5
"Up to" 1 TB HDD
My factory 2013 MBP, to which this is supposed to be equivalent: 2800x1800 display
16 GB RAM
Sandy Bridge i7
512 GB SSD
Come on [whoever is behind this]. If you're going to distribute hardware prepare a really nice laptop running Ubuntu or Linux Mint and sell it to geeks with hardware support.It's still nice to see more competition in this space, though.
Decomposing your code into modules is step one. Making the interface between your modules generic enough to easily replace is the next problem, but if your code is a monolithic blob in the first place that's not going to be possible.
My main issue with modularity in JavaScript is the lack of strict typing, because you won't know if your interface fits correctly until runtime - which is why I've been looking into TypeScript and Elm recently.
I'm using mercury [0] in my current frontend project for this purpose. Most of the features of React, none of the commitment. Every single component is interchangeable; the core repository is simply an index.js requiring other modules, which can be depended on individually if you're not looking for a kitchen sink solution.
Or, rather, how does copyright work for genetic designs? Syn Bio papers are published all the time, and their designs are copyright like any other invention.
Actually... quite possibly. Check out the first slide in [1]. You can basically build genetic logic gates using promoters to conditionally (i.e. depending on the presence of light, a protein, etc.) produce a protein to induce or repress another promoter, thereby increasing or decreasing the expression of another gene.
It's still pretty early stages and there are a lot of factors that make this more complicated (life isn't binary), but the ultimate goal of synthetic biology is to be able to program DNA in the same way you might program a computer.
[1] http://co.mbine.org/events/COMBINE_2015/agenda?q=system/file...
1972 Modern
---- ------
char foo[][]; char **foo;
Really? I see the former quite a bit, and it makes it clearer you mean an array.