# Tag Info

## Hot answers tagged coffeescript

Accepted

### Operating on a list of files using recursion

Fake for-loops and comprehensions At the beginning of your post, you say that you can't always achieve everything with looping in one line in CoffeeScript. When you say that, I assume you are taking ...
• 13.2k
Accepted

### Get <TH> texts into a tab separated string

CoffeeScript is not my forte, however I quite like this approach: ...
• 32.8k

• 226

### Function with underscore overuse

Interesting question, I am not sure there is such a thing as over-use of underscore, and what the drawback would be. I think that code looks okay from that perspective. However, from a once over: <...
• 32.8k
Accepted

### Flood game implementation

Overall, it's not bad. I only have some minor observations on the code itself: You're setting, and re-setting @top in both the constructor and ...
• 32.9k
Accepted

### Mathematical boundaries (audio meter)

Assuming that you want to replicate a classical audio meter (aka green bar grows until 50, then a yellow bar appears on top of green and grows until 85, then a red bar grows from there), then the ...
• 5,150
Accepted

### Tick module for the game

Do you really need a comment above every line? There are a few good comments like ...
• 15.8k

### Promises and chained calls

Bluebird has the concept of Promisification that converts any library into a Promise. Maybe it did not exist at the time the chosen answer was written, but I wanted to add this so people coming into ...
Accepted

### NodeJS conditional request before the real request

Promises would make sense to me, but first step would be to extract stuff into functions. You don't really need promises for this, though. Here's one way to just do it with plain callbacks: ...
• 32.9k
Accepted

### English-Russian irregular words tester

First of all, I would architecture the data in a more readable and flexible way: ...
• 1,307

### Periodic Table generator

IMHO, you're making your work slightly harder for yourself with your encodings for ranges and spacers. How about using {s: 10} for a spacer, and ...
• 441

### Periodic Table generator

CoffeeScript or otherwise, it does seem like you're working a bit too hard here. Since the information you use is split between the list in the HTML and the array in the script, there's some coupling ...
• 32.9k
Accepted

### AngularJS Login Check

I think I would make a state object and a user object to represent this delema. We will make a user class to encapsulate working with the user api ...

### Prim's algorithm in CoffeeScript

@Brad M already pointed out most of the stuff I'd have pointed out too. These are just some additional things CoffeeScript is still JavaScript, so it's typically written in ...
• 32.9k
Accepted

### Displaying job status in a jQuery Datatable

First of all, you may benefit from the fact that in Coffee (and in JS, too), the following code if condition variable = value can be expressed simpler as <...
• 196
1 vote
Accepted

### Configuring a DataTable using CoffeeScript

I can't tell you when something like Angular/React will make more sense. It's a cost/benefit question, but they're your costs and your benefits. I'd say you code is okay. In some places it seems ...
• 32.9k
1 vote
Accepted

### Kruskal's algorithm

Disclaimer: I don't know coffeescript, but I do know a little javascript Most of the code is understandable, even for me not knowing coffeescript, but it is obfuscated by bad naming and laziness. So ...
• 11.5k
1 vote
Accepted

### Extracting a list of hyperlinks

I just moved things around to make it a bit more readable. You can use the map function instead of each. The signature of map is ...
• 2,264
1 vote

### Wait for all resources to be loaded

Actually I'm surprised there isn't a \$q.some or so to do exactly that. I think this is a good solution for the problem, though putting it in a separate function ...
• 11k
1 vote

### CSV lookup problem solved with CoffeeScript

Your lookupIndex may not work as intended unless the value you're using for the lookup is unique across all rows. You'll always find the last row in the CSV data, ...
• 32.9k
1 vote

### Refactor Coffee Script to fire on page load instead of change

This is borderline Code Review material, since the code doesn't work as intended. It's not the same thing as "broken", because it does run, but what you're asking for is more or less a new feature. (...
• 32.9k
1 vote
Accepted

### Conditional AND statement- which is more readable?

I don't know coffeescript, but in general, extracting complex conditions to a helper function is a common refactoring technique. When you do that, you effectively give a name to the previously ...
• 110k

Only top scored, non community-wiki answers of a minimum length are eligible