Data dodania Pytanie
2017-10-10 17:10 Is using a numeric value instead a predefinied constant bad practice? »
So this is a pretty simple example: $sth = $dbh->prepare("SELECT foo FROM bar"); $result = $sth->fetchAll(PDO::FETCH_ASSOC); Is it conside...
(2) odpowiedzi
2017-10-09 22:10 Is it always the best idea to write a function for anything that needs to repeat twice? »
Myself, I can't wait to write a function when I need to do something more than twice. But when it comes to things that only appear twice, it's a bit m...
(2) odpowiedzi
2017-10-09 20:10 Java EE, Spring clean code, can we use static methods? »
I need help, which version of code is better and why: @Component public class BodyEntityFactoryImpl implements BodyEntityFactory { public BodyEnt...
(0) odpowiedzi
2017-10-09 14:10 Pagination div is not showing »
I am trying to show pages numbers for my results. When I see my div in developer tools, all of them are getting values. But it is not showing in the a...
(1) odpowiedzi
2017-10-07 15:10 The strategy to handle database connections: To 'close it immediately' or 'when script is over'? »
I'm to developing a back-end for a demanding application that may generate a really high traffic and processing load on the server. To deal with the d...
(1) odpowiedzi
2017-10-06 15:10 Should an interface expose properties of an object or the object itself »
I was wondering, what is the best practice for designing an interface with a specific intent? For example, say I want to implement an interface to mar...
(1) odpowiedzi
2017-10-06 12:10 Odi 12c : How Can Do Incremental Load In Dimension Table No Primary Key In Stage Table »
Incremental Load In Dimension Table No Primary Key In Stage Table Note : There Is No Primary Key In Stage Table . ...
(0) odpowiedzi
2017-10-06 02:10 Need a nicer code in Scala (challenge!) »
In one of my services, I have the function as presented below. private def convertCreateResultsToCreateAllReasult(results: List[CreateResult.Result])...
(0) odpowiedzi
2017-10-05 16:10 How to make code easier to read when using anonymous inner classes in java for Android apps? »
In my experience with Android apps its not too uncommon to see lots anonymous inner classes. Right now I'm working on an auto update feature and have ...
(1) odpowiedzi
2017-10-04 07:10 How to secure my website from attackers? »
I'm creating a dynamic website using php and I want to secure it from attackers.So what are the methods / tips / coding style / .htaccess to secure t...
(0) odpowiedzi
2017-10-04 05:10 Reuse jQuery effect without having to constantly rewrite the effect for each class ID »
I have a question based on jQuery. I have classes/IDs in which I use the same jQuery effect. Therefore, I have to rewrite the effect each time I want ...
(1) odpowiedzi
2017-09-28 19:09 Java 8 Predicate placement in project structure »
I am wondering where should I place java 8 predicates in standard web java project structure. Lets assume that my project structure looks like that: ...
(0) odpowiedzi
2017-09-28 07:09 Python style guide: intermittent variables »
I was searching for a Python style guide in terms of "intermittent variables" and readability. The code that I develope will be mainly used by non-pro...
(0) odpowiedzi
2017-09-27 11:09 Is there any PSR / convention about Alternative Syntax? »
I've seen a lot of posts talking about why alternative Syntax in PHP is good/bad. It's not the topic, I'm a convention lover and I want to know if th...
(1) odpowiedzi
2017-09-25 17:09 Interface segregation principle - Java »
I have an interface interface XXXCommandHandler(){ void parse(String something); String response(); String additionalResponse(); } Som...
(3) odpowiedzi
2017-09-25 07:09 Advanced code style in Clion »
I want to have google-style like code style checker that would automatically run within Clion. However, what I found as solutions (predeclared code s...
(1) odpowiedzi
2017-09-23 18:09 should a return variable of a class method be stored in the class itself or not? »
The answer to this question is probably going to depend on the exact circumstances, but as I do not have clever thoughts about it anyway, I thought it...
(1) odpowiedzi
2017-09-20 20:09 Is a large number of attributes in AngularJS indicative of an issue? »
A general consensus is that, unless there are strong reasons to do otherwise, the number of parameters of a method should be small enough. How much i...
(2) odpowiedzi
2017-09-19 09:09 My page is not redirecting at my Home Page »
Hello I'm working with PHP.At this moment i have just inserted data in database by php code.Just name and email + submit. But i want when i will click...
(1) odpowiedzi
2017-09-16 04:09 How do I make a list comparison be case insensitive? »
current_ids = ['mason' , 'chase' , 'erin' , 'guillermo' , 'george'] new_ids = ['sara' , 'gregory' , 'ChaSe' , 'josh' , 'Erin'] for new in new_ids: ...
(1) odpowiedzi
2017-09-15 22:09 Should I suggest code reviews when my team leader writes spaghetti code? »
When I inheret a code from some of my colleagues in the team (who went on a vacation for example), I literally suffer modifying their code and fixing ...
(2) odpowiedzi
2017-09-14 09:09 How to create custom coding rules in xcode for objective C and swift? »
How to create custom coding rules in xcode for objective C and swift ? like code should maintain expected coding standards if it doesn't match coding ...
(0) odpowiedzi
2017-09-14 02:09 How to tell if any element in a list of combinations is in a specific set in the most efficient way? »
here is what i mean by the question: j = [1,2,3,4,5,6,7] k = [1,2,3,4,5,6,7] #I want to generate all possible pairs of pairs with these two lists, f...
(0) odpowiedzi
2017-09-11 11:09 Is it best to call a method (from class A) in a class (class B) which then calls a method in a class (C) or to use a getter for Class C in Class B? »
E.g. In Class A: b.doThing(); In Class B: doThing() { c.doThing(); } OR In class A: b.getClassC().doThing(); What is the convention for...
(3) odpowiedzi
2017-09-10 18:09 Trouble simplifying repetitive - multiple if elif statements and multiple loops in a function in python »
I am very new to Python. I am a firm believer of simple, concise and efficient algorithmic design as well as coding style. As I am learning Python, I...
(3) odpowiedzi
2017-09-08 11:09 What is runtime error (NZEC) in Java? »
Here is the code challenge question I am working on. And my code is: import java.io.*; class NEW { public static void main(String[] args)throws...
(0) odpowiedzi
2017-09-07 14:09 Automatically apply C# 7 getter and setter style »
Is there any way to automatically apply C# 7 getter and setter styles (or maybe other new language features)? It would be nice if there would be any ...
(1) odpowiedzi
2017-09-06 12:09 Swift 3 functions naming convention »
I'm a little bit confused by function naming convention in Swift 3 I went through Swift 3 Guidelines and I found that method naming convention should...
(2) odpowiedzi
2017-09-05 18:09 Extjs 5 reference grid by docked button's click event without using .up? »
I currently have a grid with a button that I click to act upon the records in the grid. At the moment I use a button.up('selector'); to get the grid,...
(1) odpowiedzi
2017-09-04 21:09 Rename/Refactor database elements - only scripts exists but not database »
I have script (.sql) files ready to create a database (create schema, procedures, add test data). I also have coding standards/conventions to be set ...
(1) odpowiedzi
2017-09-04 07:09 C++ and the dangers associated with including complete namespaces »
After watching Clean Coders Hate What Happens to Your Code When You Use These Enterprise Programming Tricks from Kevlin Henney. We're wondering if in...
(0) odpowiedzi
2017-09-01 12:09 Is it OK to have property which can be or false or array or null »
Is it good practice to have properties like this: /** * @var false|array|null */ protected $mockMethods = false; This property can be or false or...
(2) odpowiedzi
2017-08-31 16:08 Add a new code style on PhpStorm »
I have started using Semantic UI and I noticed that when I want to customize my css, I need to make .variables and .overrides files. Their syntax is j...
(0) odpowiedzi
2017-08-30 17:08 List of similar objects - invoke different method for each element »
I'm looking for a good practice/idea how to write a clean code for my solution. Let's say I have class Foo: public class Foo { public SomeEnumTyp...
(1) odpowiedzi
2017-08-30 10:08 Scala trait and class in the same file »
Is it a good practice to put a trait and class implementing it in the same file in Scala? E.g. in B.scala you have : trait A class B extends A ...
(2) odpowiedzi