0
votes
0answers
2 views

GPL location in Python source

Besides the COPYING file, to also follow the how-to advice of GPL describing "adding two elements to each source file of your program" (copyright notice and permission), "right near the top of each ...
1
vote
3answers
1k views

iOS chat application design, sending/relaying the message over to the end user

I have a design question. Let us say you were tasked with building a chat application, specifically for iOS (iOS Chat Application). For simplicity let us say you can only chat with one person at a ...
1
vote
3answers
410 views

Where should I put bindings for dependency injection?

I'm new to dependency injection and though I've really liked it so far, I'm not sure where bindings should go. I'm using Guice in Java, so some of what I say might be specific to just Guice. As I see ...
-1
votes
0answers
15 views

How do I use connection string from app.config for datasets created with visual studio dataset wizard? [on hold]

I have created a new instance of SQL Server 2008r2 and exported my database to the new instance. Then I realized that the connection string for all of my datasets still point to the original database. ...
3
votes
2answers
74 views
+50

RESTful Api: Send email with links to client URL

A client can call the following REST api URI to send an enquiry POST /v1/businesses/{business_name}/enquiries The enquiry can then be viewed through the following call: GET ...
6
votes
2answers
262 views

What is best practice to handle whitespaces when letting the user edit the configuration, the name=value pairs?

For instance, you let the user define the notorious path variable. How do you interpret apppath = C:\Program Files\App? This looks like a programming language adopted practice to ignore the white ...
0
votes
2answers
19 views

Iterating a function with a static argument: Global functions + lambdas vs internal function?

I am never sure which of these is better form: Option A def a(x,y): def b(z): return z+y return map(b, x) print a([10,20], 5) Option B def b(z,y): return z+y def a(x,y): return ...
1
vote
1answer
10 views

How to make scalable modules in a div element

I'm interested in creating web modules that are encapsulated by a div element in a manner that, by simply resizing the div, everything in that div scales to the dimensions of that div proportionately ...
2
votes
2answers
127 views

Communication/Updates between units of works/entity framework contexts, colliding with user changes

I'm developing a WPF application using Entity Framework for my database communication. The application has a hierarchy of tabs where each tab has a db context. Each tab allows the user to view some ...
0
votes
0answers
5 views

Why can't we use std::fill() the same way for 1D and 2D arrays? [migrated]

I have seen that if we have a 1D array int A[10], then to fill it with an arbitrary value, say 0, we use std::fill(A, A+10, 0) For a 2D array B[10][10], we fill it with 0 as: ...
-4
votes
0answers
29 views

How can I use two or more threads using same run method work on different arrays? [on hold]

Platform- java applets with multithreading OS- Ubuntu There are 2 arrays x and y with 100 elements each. These arrays store the coordinates of an snake. The run method is used to manipulate the ...
1
vote
2answers
51 views

Software development - The industry & general trends / Bad practices [duplicate]

I am a Web Developer and part of a small team working on an abundance of projects. This is my first "actual" real company after graduating with a degree in computer Science and I have about 2 years ...
9
votes
4answers
642 views

How to migrate my thinking from C++ to C#

I am an experienced C++ developer, I know the language in great details and have used some of its specific features intensively. Also, I know principles of OOD and design patterns. I am now learning ...
0
votes
3answers
74 views

Check a boolean before setting it in a loop, or just set it

I have a rather tight loop with the following check to see if balance had ever been positive: balance_null = True while (crazy_loop()): ... if 0.0 < balance: balance_null = False ...
0
votes
2answers
72 views

Would redrawing controls in c# give more performance?

Now I realize this is a kind of weird question but here it is: Let us assume I redraw all the controls by myself rather than using the default provided ones (Obviously I'm talking of winforms as WPF ...
1
vote
0answers
13 views

How to inform WebStorm's autocomplete about WebGLRenderingContext

I'm working on a project involving WebGL, and using WebStorm to do the development. One issue with the development flow is that WebStorm isn't about to autocomplete things related to WebGL. In ...
-4
votes
0answers
13 views

Working C code of Strassen's Algorithm [on hold]

hey can anyone provide me a proper implementation of Strassen's algorithm of solving product of two N*N matrices where N is a power of 2?? i have tried to implement it myself but its not working as ...
1
vote
0answers
38 views

How to create a dynamic plugin system? [on hold]

TL;DR What are common patterns / architectural systems to create dynamic / decoupled plugins? I want to create a dynamic plugin system. Let me try to explain what I actually want to achieve. ...
0
votes
0answers
9 views

Need to add websocket support to a single page that's running a wsgi service

Current setup. I have a legacy ERP system (Thoroughbred) and i then have several in house applications (CRM, WMS) and a website that interact with it via an xml server and straight ODBC connections. ...
11
votes
3answers
469 views

Why would many duck-typed dynamic programming languages use a class-based approach instead of prototype-based OOP?

Since quite many dynamic programming languages have the feature of duck typing, and they can also open up and modify class or instance methods at anytime (like Ruby and Python), then… Question 1) ...
0
votes
3answers
252 views

How can I configure my programming environment to enable rapid switching between projects?

It often happens that I develop multiple different projects at once, so I need a solution to switch from one environment to another. I have created batch files to do the job but as this thing grows, ...
-3
votes
0answers
10 views

Managing database for maintaining user profile [on hold]

I am creating a Web directory with user personalization.I am keeping options for login and registering of user.How to maintain a database for these two when a user registers and login into the ...
34
votes
6answers
13k views

A practical use of “yield” keyword in C#

After almost 4 years of experience, I haven't seen a code where yield keyword is used. Can somebody show me a practical usage (along explanation) of this keyword, and if so, aren't there other ways ...
-4
votes
1answer
46 views

Python doesn't write information correctly to a file [on hold]

My program should save the data of each student who takes a test to a file. There are 3 files for 3 different classes and when the quiz has been completed and python writes to the files the ...
1
vote
2answers
40 views

Literal strings vs. object properties in JavaScript

JavaScript libraries in the same space (UI widgets) use two different approaches for instantiating components: Literal strings to specify types, and inlining as much as possible, for example: var ...
-1
votes
0answers
43 views

How to learn Computer Programming [on hold]

This is probably broad question and potentialy not a question as I am looking for an advice rather than factual answer. I will delete it if somebody thinks it is stupid. I am a programmer and I like ...
0
votes
2answers
47 views

Controller in MVC

Alright so it is an essential part of OOP that one class should only do one thing, and it makes sense. In practice I've seen that classes which don't obey this rule get thick and cluttered. So I was ...
1
vote
4answers
108 views

Why are FLOSS licences applied to files instead of diffs/deltas?

In the case of open source software development, where contributions build on previous work I would find it more sensible for each copyright holder to hold copyrights on the diffs/deltas he/she ...
5
votes
4answers
183 views

How to convert the following node evaluation procedure to a non recursive solution?

I have the following recursive method. It evaluates a node (that represent a logical expression), using deep first search traversal : EvaluateNode(Node node) { bool result; switch(node.Type) ...
-2
votes
2answers
89 views

Is there such a thing as a specification-code framework?

I've been googling for a while and can't fathom why this doesn't exist yet. By a specification-code workflow I mean a system which links code to it's specification. For example I could be looking at ...
-1
votes
1answer
37 views

How to handle authentication to web service from mobile?

I'm making a mobile application, and I use JSON Web Token Authentication (JWT Auth), but I have three questions about: Should I use refresh-tokens or non-expiring access tokens? In case I use ...
0
votes
1answer
77 views

Generate all possible outcomes from pattern or range

I have multiple patterns that I want to expand. Expansion should expand number and letter ranges between curly braces. Numbers need to support padding. I want to have it expand into a List(Of String) ...
1
vote
2answers
435 views

Repository Pattern: Doctrine2 vs Microsoft Entity Framework?

I have been using Symfony2 with Doctrine2 for some years. I have recently started using Microsoft's Entity Framework with MVC5. From my Symfony2 experience I understand that a repository's job is only ...
5
votes
3answers
450 views

How can I best study a problem to determine whether recursion can/should be used?

In some cases, I fail to see that a problem could be solved by the divide and conquer method. To give a specific example, when studying the find max sub-array problem, my first approach is to brute ...
7
votes
3answers
362 views

Should I keep email addresses as plaintext in database?

It's clear to everyone (I hope) that storing passwords without at least salting/hashing them is a terrible idea. What about emails? Let's say you keep the subscription email address, if you encrypt ...
0
votes
1answer
25 views

RESTful Backend - How coupled should my back end and front end be?

I'm creating a web application with a front end client written in angular as well as a back end that I'm writing in Django (there are reasons I picked the frameworks but they are irrelevant to my ...
2
votes
1answer
61 views

Combining Patterns: Fluent Builder and Null Object Pattern

I am currently wrestling around with some GUI code where I have a table whose rows correspond to some object, let's say a Person object. When the table initializes, it fills the table with the Person ...
1
vote
3answers
163 views

Avoiding a large amount of overloads

I'm currently writing a mailing interface for our enterprise application. Dependent on the send mode (regular email, bulk email, templates, mailmerge, ...) our Send() method requires a bunch of ...
0
votes
2answers
119 views

Algorithm for merging multiple rows of data

I need an algorithm to merge multiple rows for data, where one column is the index column and if one or more rows have the same index value merge the column values into a single row, and lastly sort ...
1
vote
4answers
87 views

What is a better design a light weight user or a heavy weight heavy user model?

This is a design question and I am confused about how to design my user object. As in most systems, user is the central part of my application and a lot of information scattered around my database ...
0
votes
3answers
121 views

BSD-2 Licence Code modifying

I'm using a BSD-2 Licence code in my project and with author permission, I modify the code. Now, I am using this code in my project. I know, I should mention Author's name and copyright information. ...
-1
votes
0answers
11 views

Symfony 2 Log out error [on hold]

I am trying this links from 7 days but still today I am getting errors may I know what the wrong with this login page? Why I am not getting log out after login? ...
0
votes
2answers
52 views

When are you violating a license like the GPL?

Specifically in the following scenarios where you're working on an open source library using an incompatible license like the MIT license. You copy & paste a method from a GPL library - ...
1
vote
1answer
73 views

Does ORM at any point become a “requirement” for RESTful API?

I've started building a RESTful API in PHP's Slim framework. The framework appealed to me because of its light-weight design and routing features. I am using PostgreSQL for the database. However, ...
24
votes
4answers
2k views

Is my boss's preference for Latin-1 over UTF-8 when it comes to database configuration justified?

We are using MySQL at the company I work for, and we build both client-facing and internal applications using Ruby on Rails. When I started working here, I ran into a problem what I had never ...
1
vote
4answers
83 views

How handle a chain of Whens or Thens in a Scenario?

I am trying to figure out how to write BDD scenario where it seems like I need a chain of "Then" conditions. How do I write it? As one scenario? As two scenarios? Here is how I've written as one ...
-1
votes
0answers
9 views

ORMLite on App-Server [on hold]

I am wondering if it is a good idea to use ORMLite as persistence layer in Java EE environments? I am also uncertain about the implementation of ORMLite in a JAX-RS Jersey environment in particular. ...
-1
votes
1answer
39 views

Where should I create utility classes that are used by unit tests, integration tests and functional tests?

Say I have a project that's using the standard Maven/Gradle project directory structure, with the source file directory like this: src ├── functTest ├── integTest ├── main └── test What would be ...
2
votes
2answers
104 views

Why is the Document Object Model the view?

I was told by a Javascript programmer not to do DOM manipulation in model code. I also remember hearing a snazzy tune for a JS framework (I forget which one): "Get your models out of the DOM". This ...
-2
votes
0answers
7 views

Setting logging in GlassFish [on hold]

I use Server-sent events technology and GlassFish with standart java.util.logging. How can I disable logging event is sent to the log file?

15 30 50 per page