0
votes
0answers
82 views

Member vs free function [duplicate]

I've read similiar topics and also the following great article: http://www.gotw.ca/publications/mill02.htm I'm still not quite sure how to apply it though. Basically I have a class that is an ...
3
votes
1answer
369 views

Watson Information Encoding [on hold]

IBM's Watson has a lot of book information encoded into a 'database' that Watson searches in real time. Does anyone know how that information is coded? It seems hard to imagine how humans could type ...
2
votes
2answers
3k views

Python - assert vs if & return

I am writing a script that does something to a text file (what it does is irrelevant for my question though). So before I do something to the file I want to check if the file exists. I can do this, no ...
7
votes
3answers
1k views

How to separate sensitive data in database(MySql)

I need to design a database that will contains information about personal disease of users. What can be the approach in order to implement the columns of the DB's tables: encrypt the information, ...
16
votes
2answers
3k views

What's RAII? Examples?

Always when the term RAII is used, people are actually talking about deconstruction instead of initialisation. I think I have a basic understanding what it might mean but I'm not quite sure. Also: is ...
-3
votes
2answers
113 views

JavaScript form validation without clicking submit button [on hold]

I want to validate a form using java script before user clicks the submit button. <form role="form"> <div class="form-group"> <label for="email">*Email ...
2
votes
2answers
151 views

return a object without returning the reference

i'm having some trouble with returning objects and lists of objects. To problem is I want to return a object in my example an developer but I don't want to give the reference. What's the best ...
-1
votes
2answers
93 views

Hardware for a team of programmers (iOS / Android / Web developers) [on hold]

My question is not directly connected to the art of programming but about setting good working conditions for a team of developers, and I hope I can have some feedback here. I am looking for ...
14
votes
2answers
290 views

Conceptual mismatch between DDD Application Services and REST API

I'm trying to design an application that has a complex business domain and a requirement to support a REST API (not strictly REST, but resource-oriented). I have some trouble coming up with a way to ...
1
vote
1answer
30 views

How do workflow tools (jBPM) keep transactional state consistent?

I'm looking at jBPM specifically, but I think this applies with other systems too. As I understand it.. When placing an item into a workflow, one does not generally put a reference to that item, one ...
0
votes
4answers
100 views

Quit a program in main or in function?

Lets say I have a void method/function to check the arguments of the program: void check(int argc, String argv){ //some irrelevant code } In this function I have some checks to validate the ...
-2
votes
0answers
35 views

Power8 or ARM or Intel server platform for long-term investment protection? [on hold]

Which server platform do You consider such as the best solution for long-term investment protection ? Some people can say "The future is unknowable" and can cancel this question ... But some ...
5
votes
2answers
716 views

What are the prerequisites for learning Go

I am considering learning Go. As far as I know about it, it's a systems language geared toward parallel programming. (correct me if I'm wrong) Should I have a very good understanding of C in order ...
12
votes
5answers
842 views

Can *any* program task be expressed without state?

This is a theoretical question, but after many years of programming in what I now realize is "normal" imperative technique, using C++ mainly, I've discovered this other world of functional ...
7
votes
2answers
305 views

Big O equivalence for LINQ select

I'm trying to determine if there is a change in the Big O equivalence of a nested loop when I use a LINQ select instead. public void myFunc(List<Foo> fooList, List<Bar> barList) { ...
3
votes
1answer
49 views

How to handle Django get-single-instance-in-view pattern?

A lot of my Django views start a little bit like this: try: # here request.POST could also be request.GET or a captured URL parameter MyModel.objects.get(user = request.user, some_attr = ...
-4
votes
0answers
27 views

Operating Systems Programming Project : (Bus) Inter Pprocess Communication [on hold]

I have a project in operating system programming (Lunix) using c language , may anyone help me , please , This is the project description : implement a new inter-process communication method called ...
-1
votes
0answers
38 views

Coinvault / Bitcrypto ransomware idea [on hold]

So I got affected by this ransomware called bitcrypto , it looks similar to coinvault . It claims to have encrypted most of my data . Although there's not much I can try to break its AES 256 bit ...
1
vote
2answers
286 views

.NET Why should I use DAL over direct database access

Yesterday on one of SO chats I've been told I should never connect to database directly from the application and rather use DAL. I've been told that: 1. Using something in the middle should improve ...
-1
votes
0answers
40 views

What are the right terminologies for website UI elements? [on hold]

This must be a very rudimentary question. I recently need to do some test work on some websites, and i am having trouble describing UI element in website not knowing what are the proper term to use. ...
19
votes
5answers
8k views

What best practices should be employed in a PHP login script?

I am wanting to re-write my login scripts for clients websites to make them more secure. I want to know what best practices I can implement into this. Password protected control panels are in their ...
2
votes
3answers
159 views

Accessing shared data without blocking in TPL

I am writing a class that contains data. It exposes methods that allow to query the data, while the data is also being updated from an external source (web service, for example). All the methods ...
228
votes
16answers
38k views

Why are shortcuts like x += y considered good practice?

I have no idea what these are actually called, but I see them all the time. The Python implementation is something like: x += 5 as a shorthand notation for x = x + 5. But why is this considered good ...
1
vote
1answer
41 views

Advice on architecture (WCF / MVC)

First of all, the basics. N-tier application: presentation, business layer, database. It is an old .NET 2.0 (WSE + WinForms) application, a bit more tightly coupled than I'd like, and the requirement ...
85
votes
16answers
6k views

How can I tactfully suggest improvements to others' badly designed code during review?

I'm a great believer in clean code and code craftsmanship, though I'm currently at a job where this isn't regarded as a top priority. I sometimes find myself in a situation where a peer's code is ...
22
votes
3answers
3k views

C++ strongly typed typedef

I've been trying to think of a way of declaring strongly typed typedefs, to catch a certain class of bugs in the compilation stage. It's often the case that I'll typedef an int into several types of ...
2
votes
1answer
40 views

What's the best practise for storing web server credentials for your web app deployment?

I was looking at the Oracle documentation for the weblogic maven plugin. In it, they store the weblogic user name and password for accessing in the pom.xml. Just wondering, isn't this a terrible ...
-1
votes
2answers
196 views

which one is recommended object-oriented design? [on hold]

I made simple object-oriented prgram, and think about design. I wonder which one of belows is recommended object-oriented design. Most left side class is "Main" class. Black arrow means they are "Has ...
0
votes
0answers
44 views

GIS Design Patterns

I am looking to implement a GIS based application for climatological purposes. I have looked at these two papers as a template for structuring my data objects - ...
-1
votes
0answers
18 views

Node js keyword search [on hold]

I am making a Node JS application and one of the functionality is to search a text against a set of keywords to see if this text has one. The search can have options like matching case or whole word ...
0
votes
1answer
36 views

Making API calls with celery

I'm designing a system for a client where the requirements are: they upload a JSON file (one object/line) make a call to an API with the JSON object as the payload record the state (success/failure) ...
0
votes
1answer
52 views

how can the presenter or view interact with the model in the MVP pattern?

I'm learning the MV* patterns. MVP in this case. I'm trying to refactor an old android application into the MVP pattern to make things less tightly coupled, but I'm struggling one one concept. I know ...
1
vote
0answers
43 views

Knowing when a SQL table is done updating before Querying

I am using a self hosted windows service WEB API as the layer between my Windows 8 App and a SQL Server Database because Windows 8 apps can't directly connect to SQL server like win forms or pretty ...
3
votes
1answer
55 views

Is FormsAuthentication obsolete? [on hold]

I am creating a website using ASP.NET MVC 5. I want to know if it is still OK to authenticate user using FormsAuthentication? Did Microsoft release any technology to replace FormsAuthentication?
5
votes
3answers
199 views

When should I use C#'s implicit type conversion operator?

In C#, we can overload the implicit conversion operator like this (example from MSDN): struct Digit { /* ... */ public static implicit operator byte(Digit d) // implicit digit to byte ...
1
vote
0answers
28 views

Using AngularJS to develop easy to implement modules for customers, wondering if this is a good way to implement this functionality?

Where I'm working, we currently have quite a few clients, both using Wordpress and custom site solutions that require our data to be sent via JSON to their site where they can then display it without ...
2
votes
1answer
73 views

How to design a serverside heartbeat with nodejs?

I would post this on http://stackoverflow.com/, but figured I am not looking for code, just an idea how to accomplish this. I have a gameserver that interacts with nodejs and uses the websocket ...
2
votes
1answer
240 views

WCF Versioning, Naming and Endpoint URL

I have a WCF Service and a Main Lib1. Say, I have a Save Profile Service. WCF gets data (with predefined data contract) from client and pass the same to the Main Class Lib1, generate response and ...
0
votes
1answer
68 views

Do iOS frameworks require the same internal versioning as OSX frameworks?

I have been reading through the apple documentation for creating frameworks for OSX and iOS. Reading about the structure of frameworks, I began to wonder if there is really any need to create the ...
1
vote
0answers
68 views

Software paradigms: prove that sum and sum1 are equal

Here are given two functions that calculate the sum of elements in a list. The proof should be done using induction. The hypothesis is: sum(as) = sum1(as, 0) def sum( as : List [ Int ] ) : Int = as ...
2
votes
3answers
93 views

Design ideas - validation based on conditions outside of the domain

I am facing a very interesting problem here, and I'd like to see some design ideas from domain driven design perspective. To make it easier to express what I need I have following hypothetical ...
0
votes
4answers
19k views

2 Dimensional Arrays in C++

I started learning arrays in C++ and came over a little side note in the book talking about 2D arrays in breif. I tested it out and i was amazed that it could give the programmer the ability to store ...
-1
votes
0answers
59 views

Algorithms to find probable lines given a set of dots? [on hold]

I'm looking for ideas on how to approach the problem of connecting dots to form lines. Each line can have an arbitrary number of dots in it, with the dots being no more than a certain distance away ...
33
votes
8answers
5k views

How do I communicate to a colleague that their code does nothing? [duplicate]

Stay with me here. When I say the code "does nothing", I mean something like the following function: void factorial(int n) { int result = 1; for(int i = 1; i <= n; ++i) { ...
-1
votes
1answer
35 views

What technical caveats exist using EXT file system on Windows that programmers should be aware of? [on hold]

Every year I search for progress in mounting my Linux EXT (ext2,ext3,ext4) volumes on Windows. This isn't looking for those tools, I already know of things like Ext2Fsd - though if you know if ...
0
votes
1answer
48 views

Using Websocket for a multiple-page website

Is using Websocket (in particular, in a Java, SpringMVC webapp, with the Spring Websocket support libs, but the question probably applies to any language) for a multiple-page website a bad idea ? ...
3
votes
3answers
189 views

Is this a good method to create class hierarchies?

Is it a good design to store the type of the object in the base class as an enum? For example, consider the following hierarchy Expr --Unary --Binary --Const ----Int ----Float How to represent the ...
1
vote
2answers
69 views

How to test android apps that depend on telecom provider connection?

I am planning to write an app that needs phone number and contact list. Is there any way that I can test my app without buying a telecom provider connection for my android phone. Without a sim the ...
2
votes
2answers
189 views

Problems with OO design for application with pluggable components

I'm trying to refactor an ugly code and make it easly extendable in the future. The application should be nothing else but a series of components that have input(s) and output(s). The components ...
-3
votes
0answers
18 views

Microsoft.Reporting.WinForms VS2013 Missing [on hold]

I've found several answers to this - Most involve running the REPORT VIEWER 2012 RUNTIME from https://www.microsoft.com/en-us/download/confirmation.aspx?id=35747 Been there done that. Doesn't show ...

15 30 50 per page