Data dodania Pytanie
2017-04-03 22:04 Closing brace on new line brackets.io »
When I write JavaScript i like to have the opening brace on a new line. When I create a for loop or if statement for example, I press the return key a...
(1) odpowiedzi
2017-04-03 13:04 How could I pass enum object with nested enum in it to a method as parameter? »
Suppose we have an enum object like this: public enum Action { FOO, BAR; public enum Move { UP, DOWN, LEFT...
(1) odpowiedzi
2017-04-03 00:04 Clean code - Where should @Autowired be applied? »
I'll start with a simple example. You have a Spring boot application that runs a CommandLineRunner class on initialization. // MyCommandLineRunner.ja...
(2) odpowiedzi
2017-04-02 19:04 Which is better Scala style? »
Although I know this might be purely preference based, I have a question about style. Given the code below: map { updateWriteResult => logg...
(1) odpowiedzi
2017-03-31 06:03 Ruby loops style/convention »
I'm wondering how I would create the following psuedo-esque code's conventional equivalent in Ruby. I've read quite a bit regarding standard practices...
(4) odpowiedzi
2017-03-28 22:03 If versus '?'. Which one is cleaner »
Person person = Person.getRandomPerson(); if (person.getSex().equals(PersonSex.MAN))) { person.setName("John"); person.setSurname("Wick"); ...
(1) odpowiedzi
2017-03-24 16:03 What's the pythonic way to pass arguments between functions? »
I have some arguments taken from the user and passed along function to function (some functions in different classes), until it eventually gets to a f...
(0) odpowiedzi
2017-03-23 21:03 Conventions and good practices in handling exceptions with spring-boot »
I have always some doubts - should I catch exceptions in case I can't deal with error ? After all, in my case of web app spring-boot automatically se...
(1) odpowiedzi
2017-03-22 05:03 Using try/catch for preventing app from crashes »
I have been working on an Android app which uses try/catch frequently to prevent it from crashing even on places where there is no need. For example, ...
(13) odpowiedzi
2017-03-21 17:03 Is encapsulate a private field into a variable a good practice? C# »
For example: public class Test { private string _s; public Test() { var s = "hello"; _s = s; } public void Foo(...
(2) odpowiedzi
2017-03-17 17:03 Objective C : Clean code Ternary operator creating NSDictionary »
I would like to know the general opinion about a situation that I have had several times during my development experience. The question itself is abou...
(2) odpowiedzi
2017-03-16 10:03 When to split programs into two repositories? »
If you have 2 applications that share a lot of code. What is the general guideline before splitting the 2 applications into two different repositories...
(1) odpowiedzi
2017-03-16 10:03 is it a good practice to have main() fuction in a library »
i have seen code where the main() function is part of a library. And different C application implement a function that is then called from the main fu...
(0) odpowiedzi
2017-03-15 14:03 Actionscript 3, reading two files then triggering a function, best practice »
I need to read a part of two files, and once both parts of both files are loaded to trigger a function that does some work. What is the best way to a...
(2) odpowiedzi
2017-03-14 23:03 Is this Pythonic? Assigning class methods dynamically »
Depending on the input to a class, different methods need to be used under a common interface (called method here). Which of these is more Pythonic? ...
(1) odpowiedzi
2017-03-14 20:03 Best way recursive PHP to array »
I have to get elements of multidimensional array and I have this solution, but I think is a rude solution... Is there a better approach to this probl...
(1) odpowiedzi
2017-03-14 20:03 Inline comments for if/else on the same line with the opening brace? »
Which of the below variants is better/best, and why? NOTE: the comments below are intended to document the result of the if/else operation (e.g. "cat...
(0) odpowiedzi
2017-03-12 10:03 How to WAP in Java to print an input string from the User and then sort it in order of Dictionary? »
I came across a challenge that accepts an input string from the User and then sort the words in alphabetical order of Dictionary. Example: "Hi My Name...
(0) odpowiedzi
2017-03-11 00:03 Decorators in Go, code-style matters »
So I have a decorator-like function to format functions output as markdown code block. Someting like this: func mdFormat(f func() string) (func() str...
(0) odpowiedzi
2017-03-10 15:03 Static code analyzer for Angularjs »
I have a project build with AngularJS with frontend and Spring framework on backend. I am applying CI for the builds and I need to check the code stan...
(0) odpowiedzi
2017-03-09 20:03 Is better to have all evaluation inside the same if or break it into several if? »
I have this if if ( player['usingAuthCookie'] && Math.round(e.duration - e.position) <= LOAD_COOKIE_X_SECONDS_FROM...
(0) odpowiedzi
2017-03-09 15:03 Best practice C++: Reuse default arguments for multiple methods »
Given a header file that has different functions (function1 and function2): what is the best practice of sharing the same default arguments? class My...
(2) odpowiedzi
2017-03-08 12:03 How to implement Auditing system in C# in webservice? »
I created a webservice for my application. In that webservice i'm accessing SQL server for Datas. Now the feature, i've to implement is, i have to che...
(1) odpowiedzi
2017-03-08 11:03 How to implement business layer in iOS project .? »
Hello developers/experts from all over the world, I am a mid-level iOS Apps developer have a problem with my coding style. I am hearing about the Netw...
(0) odpowiedzi
2017-03-06 01:03 gd star rating style problme when rating has a float number value »
gd stars' style is not showing correctly when the rate value has a float number like 4.3 or 3.5 etc. like in this photo enter image description here ...
(0) odpowiedzi
2017-03-05 15:03 Does it make sense that every HTML element has an id and/or a class attribute specified? »
Is there a good practice advise/requirement that every HTML element has an id or/and class specified? Including elements that wouldn't be accessed fro...
(1) odpowiedzi
2017-03-05 07:03 Enforcing coding style with pre-receive Git hook »
I am working on an embedded Linux project with a small team, and we have decided to enforce a C coding style. We have chosen the Linux Kernel coding s...
(1) odpowiedzi
2017-03-04 22:03 cannot verticaly center <img> inside <a> tag »
I'm trying to verticaly center my images that work as links as well, I have created <span> tag and inside this <span> I have my <a> ...
(0) odpowiedzi
2017-02-28 10:02 How to clean up if else series »
Work in C#, want to reduce if else series, entity have two property FromServiceID and ToServiceID ,suppose my ServiceClass instance have bellow in...
(4) odpowiedzi
2017-02-25 08:02 Programming practice »
Other than Advantage Is there any disadvantage in following coding pattern(or) coding convention on programming? ...
(0) odpowiedzi
2017-02-23 12:02 Length for naming variables »
Im currently in the worst predicament since ive started as a trainee in programming a year ago. I am currently in an internship for 2 months and ive ...
(2) odpowiedzi
2017-02-23 11:02 what is better approach to handle Oracle Cursor results »
I got old code to refactor and to add new functionalities. While browsing thru code I saw many builders that makes code very dirty in my opinion. And...
(0) odpowiedzi
2017-02-21 09:02 Pythonic way to initialize variables from a file »
I have a .txt file with parameters and I need to read them and assign to class members to initialize them. In my current practice I do all these opera...
(0) odpowiedzi
2017-02-18 20:02 better design for sub-branching if statement sub conditions »
I am trying to refactor an if statement with multiple sub-conditions. From my current tries, I either have to write the conditions twice, or the inten...
(2) odpowiedzi
2017-02-18 15:02 Golang Coding Conventions: When to Break Lines in Code? »
One of my favorite things about go is gofmt. I like the fact that the coding style is standardized in many ways. However there is one thing that bot...
(1) odpowiedzi