konijn
  • Member for 9 years, 6 months
  • Last seen this week
  • Lyon, France
NodeJS and Express with Promises
Accepted answer
5 votes

Interesting, I actually really like your constructor, it is neat and shows in one place what the class does. I am not sure I would call it SignupDoctorPostRequest, since it is not a request at all ...

View answer
Simple math facts game
Accepted answer
5 votes

From a once over: You are using lowerCamelCase, that is good Variables like ans and prob deserve to be written out to answer and problem You are using functions, but I think it can be split up a bit ...

View answer
The Stack Exchange Editor Toolkit
Accepted answer
5 votes

Your mod collection is not declared in a DRY manner, this //define modules in one place App.pipeMods = { edit: function (data) { return (data + " Edited!"); }, omitCode: function ...

View answer
Ugly workaround to get the vbext_ProcKind of a procedure is breaking encapsulation
5 votes

From a once over Impressive code, I stared at it for quite a while and found only few things worth mentioning, but these are more comments than anything else. I would be willing to maintain this even ...

View answer
jQuery carousel plugin
Accepted answer
5 votes

From a once over; Very well commented Assigning element to element is overkill here and does nothing: var $element = $(element), // Reference to the jQuery version of DOM element element = ...

View answer
Count frequency of words in a string returning list of unique words sorted by frequency in descending order
Accepted answer
5 votes

From a once over: It seems your code is giving the words with fewest occurrences, consider switching b.count and a.count I am not vehemently against regexes, but if you use them, I would advise 2 ...

View answer
Character range generator
5 votes

From a once over: As a caller I would rather whether start or end was not a string instead of getting ERROR: start and end must both be Strings! Indentation! Please consider using something like ...

View answer
Markdown to HTML
5 votes

Not sure where to start.. First off, you might want to look at this response as to whether using regexes for parsing markdown to HTML is safe. You are of course not parsing HTML, but the sentiment is ...

View answer
Similar statements need duplication removed
Accepted answer
5 votes

I am not sure your quest for de-duplication is warranted, the only approach I know of is this: DECLARE @city VARCHAR(10) DECLARE @status INT SELECT c.Name, c.Phone FROM Customers c WHERE c.City = @...

View answer
Optimizing async joins for mongodb (mongoose) using async.js
5 votes

A short review; Consider using JsHint Declare data with var, otherwise you are polluting the global namespace Consider err more often, the assumption that there will be no error will bite you Do not ...

View answer
Idea of 'parser' to make the writing of asynchronous functions chains easier
5 votes

Interesting question, I find this code hard to read, I wonder what you consider unreadable code. Some remarks on pp_chain_function = function (fname,condition_string) { var queue=this; var ...

View answer
Mobile touch menu
5 votes

Interesting question, as I noted, the provided code does not work, but you can do accomplish what you tried by using :active note that this will not work without also setting <body ontouchstart=""&...

View answer
Add number of hours to 24 hour clock
Accepted answer
5 votes

Tiny question ;) As @Rotora mentioned, now is not a fantastic parameter name, it conveys that I need to only pass who late it is 'now', add is a verb, also not brilliant as parameter naming goes ...

View answer
Image Processing codes running too slow
5 votes

Interesting question, I wish you had posted more code. Some observations: Do not use parseInt, use the unary plus so instead of i = parseInt(s) do i = +s; This does not help with readability, but it ...

View answer
Finding the number of boxes that can fit into a truck using JavaScript
5 votes

Fun question, there is a lot of repeated code there to get the size of things, I would propose you use a re-usable function for this, something like this: function getDimensions( thing , unit ){ ...

View answer
Seven days a week
Accepted answer
5 votes

Interesting question, you could definitely place the last if outside of the _.each(), this would be faster ( fewer ifs ) and cleaner. I would also place the first <li> outside of the loop and ...

View answer
Simple tasks list
Accepted answer
5 votes

From a once over Do not select by class name ( as per Jeremy ), I would suggest to setting id's and select by id HTML: <input type="text" value="" class="task" id="taskInput"/> JS: inputTask : ...

View answer
Most efficient way of creating a grid in HTML with CSS?
5 votes

Most interesting, a few pointers with 64 by 64 in mind. .appendTo("#"+GRASP.config.gridContainer) <- That has got to be really slow. You access a property of an object/property of an object, ...

View answer
Is my AI solution to Untrusted Game considered logical or "ethical"?
5 votes

From a quick review: As @Amon said, I would not use this for your portfolio, especially if you are cheating You have 0 comments in your code, even for a fake AI that is not good enough Instead of all ...

View answer
Namespacing jQuery/jQueryUi into markup that I don't control
5 votes

I've worked for a media company where ads had to run with their own version of JavaScript libraries, in the end we preferred to let ads run in their own iframe. Especially since some ads required ...

View answer
Object Oriented Modular Closure
5 votes

From a once over: Do not use data-function~="exploded-state-1", instead assign id's and search by id, this is the common ( and faster, better ) approach One single var statement with comma separated ...

View answer
Basic Calculator
5 votes

Welcome to CR, from a once over: You are warning about division by 0, even if I did not select 'Divide' You can consider using truthy evaluations to shorten code: (obj.add.checked === true) -> (obj....

View answer
Alternative implementation of isType()
5 votes

I could not find anything wrong with your code, so per Meta I am going to tell you why it is awesome ;) Checking .toString() is icky, toString() could easily be replaced/enhanced Your solution works ...

View answer
Onscreen keyboard
5 votes

I am not sure about getting it shorter, but it could be improved. Indentation is a bit of a problem, check out http://jsbeautifier.org/ and paste your code to see what I mean Use var to declare your ...

View answer
Directory Searcher
5 votes

Interesting code. As you might have guessed, there's a lot wrong with it. Events instead of chaining. Makes it harder to follow the code, makes it harder on IDE's that know how to jump to a function, ...

View answer
Am I including these JavaScript files correctly?
Accepted answer
5 votes

Your code is interesting, you are clearly smart and know JavaScript, but this is a maintenance nightmare. I am assuming you will not take my advice to heart but here goes: Do not abbreviate: isfn -> ...

View answer
Sherlock and The Beast
5 votes

Your approach seems all wrong, throw all that code away <- that's the code review. You have to think about combinations, this is not like finding prime numbers. n:1 -> Because you can only build ...

View answer
Coderbyte SimpleSymbols challenge in Javascript
5 votes

First off, my solution was way more convoluted ;) Other than that, 2 minor points It is good practice to have a shortcut to [].length in general Since 'a' is larger than '+' and '=' ( in the ASCII ...

View answer
Requesting Resources Until Exhaustion
Accepted answer
5 votes

I like your code, and would use it myself, some thoughts: I assume you declare url next to JSON.load because you want to declare it close to where you use it. I would still recommend using 1 comma ...

View answer
Seeding MongoDB using Mongoose models
Accepted answer
5 votes

It seems that you are storing the data with double links (article -> category AND category -> articles). I assume that you need to report on articles for a category. I would simple create an index ...

View answer
1 2 3
4
5
27