Data dodania Pytanie
2017-01-09 19:01 Nested if statements vs function exits »
I have been writing if statements for as long as I took my first software class in College, recently my co-workers have introduced a slightly differen...
(4) odpowiedzi
2017-01-09 17:01 Mixing fmap and bind (>>=) »
In Haskell, when I have to mix calls to fmap/<$> and >>=/=<<, I invariably end up with lots of parenthesis. For example, here I'm c...
(1) odpowiedzi
2017-01-08 15:01 Cleancode: try/catch in Promise »
I am working on redux-form atm and found the piece of code. Its working for me but is there any cleaner way to write this in ES6 style? const asyncVa...
(2) odpowiedzi
2017-01-08 12:01 Is it good practice to use traits only to reduce class complexity? »
My base controller class has 2000+ lines. I know it's bad. I'd like to split the class into small chunks to make it simpler. May I use traits as "incl...
(0) odpowiedzi
2017-01-06 06:01 checkpatch.pl flags an error for octal permissions »
I am trying to resolve some coding style issues in a device driver. When I run checkpatch.pl script to run it, it flags the following error. ERROR: U...
(1) odpowiedzi
2017-01-05 11:01 Swift: where to place IBAction functions for clean class code »
What is your best practice with IBActions? Where do u place them? I cannnot decide. 1) If I place them with regular functions, it can be messy but ev...
(1) odpowiedzi
2017-01-05 08:01 Correct way to use mws api with laravel »
Can any body help me out, to understand the correct and standard way to use mws order api library with laravel 5.3 Actually I'm confused in that beca...
(0) odpowiedzi
2017-01-04 08:01 How to check php code for psr 2 validation in Netbeans »
Is there any Plugin in Netbeans for checking PSR2 Violation and fix the same. I tried adding php-cs-fixer.phar in Netbeans > Options > php >...
(0) odpowiedzi
2017-01-02 06:01 How to let android studio align assignment when reformating the code? »
Let's assume we have this code: int x; double yyyy; float zzzzzzzz; x = 1; yyyy = 24.5d; zzzzzzzz = 1.3f; after I enabled: Settings -> Code Style-...
(0) odpowiedzi
2016-12-29 05:12 Download for the Heros example app in the Angular Style Guide »
On the Angular Style Guide, all of the examples are using a Hero application. I would love to download a working version of the application because I'...
(0) odpowiedzi
2016-12-24 18:12 Angular good design pattern for implementing utility functions »
I searched for a lot of design patterns, but found nothing on how to implement functions that are going to be used both in some controllers and in htm...
(1) odpowiedzi
2016-12-22 14:12 Python modularity best practices »
I've been struggling conceptually with the design of my large program. The general layout is something like this: def mainFunc(parm_1, parm_2, ..., p...
(1) odpowiedzi
2016-12-20 14:12 Documenting first-class-assigned functions »
I have a function defined by making use of the first-class nature of Python functions, as follows: add_relative = np.frompyfunc(lambda a, b: (1 + a) ...
(1) odpowiedzi
2016-12-19 02:12 When to use multiple CPP files (Good Coding Practice) »
When writing a C++ program what is considered to be good practice in regards to using multiple cpp files? IE If you are writing a rather large (lines...
(2) odpowiedzi
2016-12-18 21:12 TensorFlow: Is there a way to initialize variables in variable scope if they're not initialized, and reuse them if they are? »
I'm trying to write "clean" code. What I want to do is if(var exists) var = tf.get_variable(...) else var = init_var I tried doing this wit...
(0) odpowiedzi
2016-12-18 07:12 What if I know the answer to something interviewer has asked me? »
I am appearing for an Amazon interview next week. Now what if I already know the answer to certain coding question the interviewer has asked me. Shoul...
(1) odpowiedzi
2016-12-16 10:12 assigning to a function that returns a reference »
I am currently refactoring some code and wondering whether the following (i.e. assigning to a function that returns a reference) is actually bad style...
(1) odpowiedzi
2016-12-14 15:12 Equals sign (and others) in constant »
I am currently refactoring a codebase inherited from another developer. In several classes, i found constants that contained the symbols =, ? and &amp...
(2) odpowiedzi
2016-12-13 21:12 Is there an elegant way to chain join() after a foreach()? »
I am trying to write something like this: DOMElement .innerHTML .toLowerCase() .split(' ') .forEach(function(word) { return word.charAt(0).toU...
(1) odpowiedzi
2016-12-13 11:12 Code style for a PHP project with HTML/CSS/JavaScript »
I need to decide on a code style for a PHP project. The project consists mainly of PHP code, but it also includes its fair share of HTML, CSS and Jav...
(0) odpowiedzi
2016-12-13 09:12 MCQ Page refresh »
I am finishing up with an MCQ based exam website which contains a database as under: Qnum Ques Op1 Op2 Op3 Op4 Correct_answer ...
(0) odpowiedzi
2016-12-11 15:12 Learning Julia (Strings, For Loops, etc)? »
Learning a programming language is always a challenge, because you are not familiar with the syntax or what functions are available. I decided to lear...
(2) odpowiedzi
2016-12-10 16:12 How should I organize implementations and declarations in C? »
FIRST PROBLEM: I am trying writing my first little project and I don't know the best way to organize all of my head files and source files. Is every...
(0) odpowiedzi
2016-12-10 15:12 How to make Xcode put starting brace on new line in Swift? »
I have noticed that the coding style in Swift appears to be to put braces on the same line as a method signature or if statement etc. Without getting ...
(1) odpowiedzi
2016-12-09 07:12 Python coding-style, Imports »
i have seep programmers using isort to sort imports, often use from django.http import ( Http404, HttpResponse, HttpResponseBadRequest, HttpResp...
(0) odpowiedzi
2016-12-08 02:12 Duplicating a variable to give it a better name »
Something that has been on my mind for a while now and I can't seem to find what I am looking for online to answer my question because as you can prob...
(1) odpowiedzi
2016-12-07 20:12 How to build a good template-based C++ library? »
I'm designing a high-performance c++ math library that (ideally) should work with any field (in a math context, so real or complex numbers) and vector...
(1) odpowiedzi
2016-12-06 13:12 Is it better to use getters or to access private members directly? »
Which of the following is better? Is it even opinion-based or are there any relevant differences? Can one or the other be favored in some scenarios? ...
(6) odpowiedzi
2016-12-04 08:12 Inline Standard Xml Documention in Visual Studio C# »
When its expanded... When its collapsed... When i tried with same approach it did not work.. Please guide me how to write this kind of standa...
(1) odpowiedzi
2016-12-04 07:12 Flake 8's equivalence to ESLint max-statements »
max-statements in Javascript ESLint offers a really good enforcement for small, modualized and readable functions. I was hoping to find something simi...
(1) odpowiedzi
2016-12-02 21:12 When do you check input type when writing class method »
How would you proceed writing the code when you have multiple inputs like in this example: public function addNameAndAge($name, $age) { if (false...
(2) odpowiedzi
2016-11-26 21:11 Style guide for R - how can I write a good code in R? What I should avoid »
Hope this is a legitimate question. I am relatively new to R, I am looking for an equivalent of python's PEP 20 or python's PEP 8 style guide. I can n...
(0) odpowiedzi
2016-11-26 07:11 Matlab Coding: Live Video Webcam using Kalman Filter »
im new to matlab... there is a project that i currently working on it but cant seem to work... so far i try this code but only appear the webcam outpu...
(0) odpowiedzi
2016-11-25 19:11 When a variable should be set as a private class variable (e.g. _var) vs a class constant (e.g. VAR) vs a private class constant (e.g. _VAR)? »
I'm finding myself unsure as to whether I should set certain variables that I use in my class as being private class variables (e.g. _var) vs class co...
(2) odpowiedzi
2016-11-25 15:11 What does prefix "On" implement in event cases in C# coding? »
I think there is quite a confusion over the usage of "On" as prefix of a C# method. In MSDN article "Handling and Raising Event" https://msdn.microso...
(1) odpowiedzi