instruction stringlengths 34 19.9k |
|---|
I know a lot about programming syntactically. What I am unsure is about how should I go to build a software from scratch. How should be the objects be designed and how should they interact with each other.
To learn how good softwares are written I have tried to read code of some good open source softwares but could no... |
In MIPS assembly, there is a register for the stack pointer, and another register for the frame pointer. What is the frame pointer and what is its purpose? How does it differ from the stack pointer?
|
Recently I read a lot about noSQL DBMSs. I understand CAP theorem, ACID rules, BASE rules and the basic theory. But didn't find any resources on why is noSQL scalable more easily than RDBMS (e.g. in case of a system that requires lots of DB servers)?
I guess that keeping constraints and foreign keys cost resources and ... |
I work on an ExtJS application with a Django backend, and we keep running into issues when we push new code. Our users seldom refresh their browsers, so after a code push we end up with users using the same (now outdated) version of our ExtJS application for days at a time instead of the new, updated version.
How do o... |
Concretely I am looking at this 2000 line file of what I will pretty arbitrarily call "mediocre" code.
It's not well-commented
variable names and function names seem consistently intelligent
functions are not well-documented
functions are good length
In short: its lines and small structures are readable, but it's im... |
I am wondering about how much time Google Summer of Code typically takes. I do have an internship lined up for this summer, but GSoC seems like quite an awesome experience. I also really want to get into Open Source development. It states in the FAQ that it's not a good idea to attempt both, but it doesn't give any ... |
Are constants always irrelevant even if they are large?
For example is
O(10^9 * N) == O(N) ?
|
I want to build most of my functionality on the client. However I'm not quite sure which server-side web development framework can provide me with a nice REST endpoint to handle resources, business logic, etc. I come from a JAVA EE world, where JSF is mostly stateful and component based (both have their pros and cons, ... |
How do I go about managing projects when there are two fundamental relationships that need to be maintained? The most obvious example that I can think of would be a firm doing some kind of location-based consulting.
I've been wracking my brain on how to explain this, in essence, this is the bullet point version:
Each... |
I have a project that will need to handle 1000s of requests a second with a decent amount of processing for each. For the most part, the processing will be done on a list of items, basically filtering it and returning a smaller list. This process can be done in parallel fairly easily and I should also say, speed is i... |
Currently we are using Source Safe and have started migration to Subversion.
All of our external SDK's(> 500 MB) are held in Source Safe right now, and I am looking for ways to move them from VSS to a repository.
We have C++ (mostly), C# (many), Java (few) projects. Hundreds of projects, all running on Windows.
I looke... |
In general, if I am using an API whose methods have side-effects that I only want to occur once, how can I guarantee that my own application only calls them once even if an error occurs before it can register a response?
For example, if I am calling a payment processing API once each month for a subscription service, h... |
I have a PHP MVC application and a file table. I need to implement the functionality: mark all as read. The best solution for the code I found so far was to put the actual implementation in a Model/Service/FileService.php
The problem is the class FileService will get bloated really fast with different functionality.
W... |
When I started studying C++ a couple of years ago, a lot of the books and texts I read did a very thorough job of explaining, how the code written would translate into concrete operations in the hardware (like dynamically memory allocation, pointer arithmetics etc.). I found those explanations extremely helpful in orde... |
I heard Silverlight will not be supported any more by Microsoft. It is true? If so, could anyone share with me Microsoft announcement? And if there are already application developed by Silverlight, what is the new technology to migration to?
thanks in advance,
Lin
|
An enum X : int (C#) or enum class X : int (C++11) is a type that has a hidden inner field of int that can hold any value. In addition, a number of predefined constants of X are defined on the enum. It is possible to cast the enum to its integer value and vice versa. This is all true in both C# and C++11.
In C# enums a... |
Some Agile job posts have a requirement "strong understanding of multiple lifecycles application development", what does it means ?
So my question would be: what's that field for, and what would I need to learn, knowing that I got Java EE experience and Agile more than 2 years.
Sorry if my question isn't constructed we... |
We have a site that allows users to generate their own content. If users generate illegal content, we'll be submitting a report to the authorities. In the event that we do have to report a user, we want as much info as possible on that user. With that said, I have two questions:
Is tracking the user's ip address enou... |
The problem: I am working on a freelance marketplace, and I decided to cancel project with one of my clients, because client is impossible to work with with limitless delays and lots of bugs in his backend. I want to give him a partial refund (partial because I worked for two months and there is 3k lines of code, thoug... |
I've been learning more about Big O Notation and how to calculate it based on how an algorithm is written. I came across an interesting set of "rules" for calculating an algorithms Big O notation and I wanted to see if I'm on the right track or way off.
Big O Notation: N
function(n) {
For(var a = 0; i <= n; i++) { ... |
Setup: Suppose you are teaching an introduction to Databases class, the students are CS students that have a working knowledge of tree structures, how they can speed up searches, and have probably implemented a few in their lifetime.
Question: How would you describe the way in which a database uses indexes to search a ... |
I'm in the process of learning the Android SDK and creating some projects to get a grasp on the system. The current project I'm working with works just fine but I'd like to get some advice about other ways I can go about designing it.
Here's what it needs to do.
When a text message is received from a specific number, ... |
I've worked in some projects where most of the business logic was implemented on the database (mostly through stored procedures). On the other side, I've heard from some fellow programmers that this is a bad practice ("Databases are there to store data. Applications are there to do the rest").
Which of these approaches... |
I believe that in an ideal team, members should have different but complementary abilities. But is that true about software development teams?
As an example we are a small team of 5. We almost have the same abilities and interests but with different levels of skills. Regarding such situation I think we don't cover our... |
Given sorted data, the search solution is obvious. Given unsorted data, sensible options are sort then search or just linear search.
This question is about what to do if the data is somewhat sorted, but cannot be re-organized (write operations require sector erase, and sectors won't fit in ram).
the details:
Data reco... |
As far as I know it is not possible to see the bits of an integer in Visual Studio, you can see variables in decimal or hexadecimal format in the Locals and Watch windows in the debugger.
Why is this limitation in place and are there any tools/addins to see integers as bits?
|
I should define a testing strategy and environments and I have encountered rather terminology issue (but might well be my fault) so I hope someone will correct me here.
We are using INT environment where the application is deployed at first and then SIT environment, where is the app passed if it is fine on INT. So, tes... |
I was wonder what people do in this situation.
You have an admin area of a system where you let users define a list of values they want to see in a dropdowns across the system.
What do you do in your application is a user wants to delete this option?
What do you do with data records which already use this value?
|
I'm looking for pseudocode suggestions for sorting my mp3 files in a way that avoids title and artist repetition. I listen to crooners - Frank Sinatra, Tony Bennett, Ella Fitzgerald etc. singing old standards. Each artist records many of the same songs - Fly Me To The Moon, The Way You Look Tonight, Stardust etc. My g... |
Suppose we have some long stack of numbers. There is another intermediate stack, and a destination stack to be returned in the end. The only two operations allowed is transferring the top of the old stack to the top element of the intermediate stack and transferring the top element of the intermediate stack onto the to... |
Given a number n, find a permutation of the numbers 1...n such that all adjacent entries sum up to primes. If such a permutation does not exist, throw an error.
Is there a purely-functional way to do this problem? The solution, which apparently uses backtracking, given uses C++, a language which I am not very familiar ... |
I started coding with php, mysql, html, and javascript back in 2002 and heck that is all you basically needed to create any type of website. Over the years I picked up other languages, but what turned me off were all of the frameworks and JQuery that was popping up every few months and clients (if freelancing) or emplo... |
I have realized that its possible to create algorithms that operate physically to solve problems much more efficiently than in a computer itself. Consider the following:
Finding the shortest path between 2 points in a connected graph. If one were to physically create the graph with the edge weights correspond to length... |
I'm writing Ruby code for a simple encryption exercise and have frequently run across this dilemma (the exercise is a solitaire cipher if you must know). It is a question of whether I should pad out my logic with descriptive variables and single step statements that make the function readable instead of a concise, eve... |
I've read in several sources including Mark Seemann's 'Ploeh' blog about how the appropriate placement of the composition root of an IoC container is as close as possible to the entry point of an application.
In the .NET world, these applications seem to be commonly thought of as Web projects, WPF projects, console app... |
I'm working on a realtime multiplayer game using Django and gevent-socketio, I'm facing some issues:
I need to send an update of the game state to connected players every X seconds (~4 seconds), so basically I need to execute a function every x seconds which does some calculations and sends the connected players the ne... |
From the Blink Blog:
Finally we’d like to explore even larger ideas like moving the entire Document Object Model (DOM) into JavaScript.
What does this mean? Does it mean WebKit's DOM is currently not coded in JavaScript but in some other language? Does it mean that they want to expose more public accessors to the DOM... |
I've been studying http://www.vagrantup.com/ for several days and I'd like a feedback by people using it in a professional context or for personal projects. I think I get what positive things can bring Vagrant but I have questions about its drawbacks:
I'm a php developer and I work in a small company. I'm wondering if... |
I'm currently planning a new ASP.NET MVC3 project which will be quite bespoke. However, there will be a lot of common features (login, profile edit, blog etc).
Initially I was planning on building this all from scratch, however I'm tempted by CMS so that I'm not reinventing the wheel, and don't waste time building stan... |
I am working in C++ and I have this problem.
class Container {
Container(int which_type_to_use_a_b_or_c);
A & getData(A & prototype);
B & getData(B & prototype);
C & getData(C & prototype);
private:
A a;
B b;
C c;
int type_used;
}
Only one of the A,B or C datatypes is actually used in a clas... |
Somewhere I read Spring offers convenience over configuration. But Spring folks are bringing in so much changes over the configuration , that I am now really getting confused to use the xml configuration or the annotation.
I would like anyone to suggest a surefire methodology or rule of thumb in using xml and annotatio... |
I'm currently on a medium-sized team of web developers. We're using jira for bug tracking.
We're working on a product with frequent layout changes. A lot of times bugs are filed about a bug in the layout in some browser. Sometimes, by the time we get around to dealing with a low priority bug, the layout has already cha... |
I'm trying to improve my OOP code and I think my User class is becoming way too fat.
In my program a user has rights over "lists". Read, Write, Update, Delete.
So I made a User class
class User
{
protected $_id;
protected $_email;
protected $_username;
protected $_hashedPassword;
//...Various setters/getters
public f... |
In both algorithms objective functions, that will be executed with non quantum computers, are used. Both algorithms are methods for finding the global minimum of a given objective function.
From wikipedia:
Quantum annealing can be compared to simulated annealing (SA), whose "temperature" parameter plays a similar ro... |
What would be the best approach to resetting a mobile app's content/settings?
Let's say the app is cross platform: iOS/android using javascript/phonegap. The current way this is designed is to have an admin area that can see mobile devices (users which have logged in). The admin has the ability to flag a device for r... |
I've recently had doubts about some design decisions that I frequently make, so this time I decided to take some time and try to analyze it to find the best solution. I will describe a simple scenario where the design decision can be easily understood. :)
Suppose we are developing a game in Java where players can have ... |
I have an existing website theme that I have built. I've been using github to maintain this theme, let's call it dragon. We are changing the theme entirely but we're using the existing theme as a foundation. Should I create a new github repository for the new theme? Or should I just continue pushing to the dragon repo?... |
I've been doing a lot of reading online trying to figure out how to write asynchronous JavaScript code. One of the techniques that has come up a lot in my research is to use callbacks. While I understand the process of how to write and execute a callback function, I'm confused why callbacks seem to automagically make t... |
Has anyone ever come across this problem?
When you have a team of developers working on a project, how can you measure their contributions to said project? Is there a "formal" way of doing it? Number of commits? Number of bug fixes? Lines committed? Or maybe on a ticket basis?
I'm trying to think of a workflow where ... |
I want to build three sites in PHP. I'm doing this as slowly, thoughtfully and carefully as I can, to learn as much about things like OOP and software architecture as possible.
From past experience I already know there will be a time when I will be glad to have logging functionality. I probably want to have different t... |
I am about to port a game that was initially written for iOs and I am having some doubts how certain things should be done.
I have been looking many of the examples of the game loops for android, and almost everywhere the game loop is designed to run in separate thread and not in main UI thread which seems fine and log... |
We have a function that modifies a JS object, by adding some custom properties to it. The function doesn't return antyhing
addTransaction: function (obj) {
obj.transactionId = this.getTransactionId;
obj.id = this.recordId;
},
Somebody said they preferred that addTransaction return the obj.
Here's what I thou... |
I'm having some issues with my Nexus 7 drawing just 500mA from a USB port able to supply 2.1A (test with my iPad). Details in this question. However, there is a comment posted "The Nexus obviously detects the 'data' pin connected, and assumes it is not permitted to draw more than 500mA (which is the proper USB spec)."
... |
I have the following classes that I want to store.
public class StorableObject
{
public string Id { get; set; }
}
public class User : StorableObject
{
public string Name { get; set; }
}
public class Project : StorableObject
{
public string Name { get; set; }
public User Owner { get; set; }
public ... |
I am designing an open source Java library that I will likely release with an MIT license, and its sole dependency is the ASM dynamic bytecode injection library.
According to their license:
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in... |
Programmers often talk about the time complexity of an algorithm, e.g. O(log n) or O(n^2).
Time complexity classifications are made as the input size goes to infinity, but ironically infinite input size in computation is not used.
Put another way, the classification of an algorithm is based on a situation that algorith... |
I'm developing a WordPress theme and am planning to sell it myself. I was thinking of having a 14- or 30-day refund policy for customers, but my concern is that people can essentially get the theme for free, if they: 1) buy it, 2) download the files, and then 3) request a refund. Then they would have both the theme and... |
Which open source java projects do you know to be high performance or real time performance? I tried hard to find them on github or google, but couldn't find suitable.
I want to learn from this projects, so will not be as a newbie on my interviews ;)
So far I am going to stick to Play Framework project.
Are there bett... |
From that question about differences between Quantum annealing and simulated annealing, we found (in comments to answer) that physical implementation of quantum annealing exists (D-Wave quantum computers).
Can anyone explain that algorithm in terms of quantum gates and quantum algorithms, or in physical terms (a part o... |
I have branched from my develop branch bugfix/issue2 to work on a bugfix. Now that it's done I want to merge this branch bugfix/issue2 back onto develop but it's asking me if I want to merge into my current branch. And I don't know if my current branch is develop?
See attached screendumps:
|
Could someone explain the rationale, why in a bunch of most popular languages (see note below) comparison operators (==, !=, <, >, <=, >=) have higher priority than bitwise operators (&, |, ^, ~)?
I don't think I've ever encountered a use where this precedence would be natural. It's always stuff like:
if( (x & MASK) ... |
Question
What are the possible ways to solve a stack overflow caused by an recursive algorithm?
Example
I'm trying to solve Project Euler problem 14 and decided to try it with a recursive algorithm. However, the program stops with a java.lang.StackOverflowError. Understandably. The algorithm indeed overflowed the stack... |
I am confused when I read this (regarding singleton design pattern):
How do we ensure that a class has only one instance and that the instance is easily
accessible? A global variable makes an object accessible, but it doesn't keep you from
instantiating multiple objects.
So what is the use of singleton pattern ... |
We have several years of customer data that has been collected over time. I'd guess that 95% of the data (Names, Business Names & Addresses) is in all UPPERCASE format.
The data entry tool used within our organization offers an "Export as Proper Case" function. We do not have the ability to modify this data import fun... |
The Situation
I'm currently working in project that develops several RESTful services that partly interact with each other. As an example:
Service A uses Service B
Service C uses nothing
Service D uses Service C
most of the Services use a common Utillities project.
There is NO actual code sharing between the service... |
I haven't come across this issue before and can't find it in my Schaum's Outline UML book and was wondering if someone here could help.
I'm making a use case diagram for e-commerce, and in it I want to describe that in order to add a book to your shopping basket, you have to either search products (using the websites s... |
In my opinion, one of the greatest things about Scala is its interoperability with Java and its similar syntax. One thing that I found strange is the use of the _ operator for package wilcard imports instead of the * operator that is used in Java.
Is there a technical reason for using _ instead of *? If not, then why w... |
When I remote connect to my work PC, in IE10, the juniper remote client service which is basically a plugin executed in the browser does not run. I need to turn on compatibility view to see it. My question is what exactly is happening behind the scenes in compatibility view such that such a large number of compatibilit... |
I have a company intranet that utilizes a similar set of data across many different pages and many different methods.
Speaking in generalities, is it closer to "best practice" to retrieve a large dataset and filter it for each specific page or method or retrieve many smaller specific sets of data to use? I cannot real... |
I am reading Cristopher Alexander's "Notes on the Synthesis of Form", and he is describing a solution to a problem as having good fit, when there is an absence of bad fit; we can't describe all of the qualities of good fit because it's too complex, but we can identify the bad qualities that stick out.
The complexity of... |
I am designing a flexible and extensible way to store configuration settings for users.
Database Table Design:
╔═════════════════════════════╗
║ ConfigurationItemDefinition ║
╠═════════════════════════════╣
║ ID ║
║ Name ║
║ Type ║
║ Default... |
I'm currently beta-testing an iPhone app. Right now I have sent out the first beta-test for my users and I have labeled that release as 1.0 for my testers.
Now since the testers have tested the app we have discovered some bugs that I have fixed and I'm ready to send out a new beta-test for my users. Should I label the ... |
At our company we have started outsourcing some of our development.
This has worked somewhat well. However, we are having a hard time getting them to properly use version control. They are familiar with SVN and know how to use it. However, for some reason they don't commit regularly, instead they work with 16 things s... |
Why do some object oriented languages let the programmer use primitive data types?
Aren't classes like Integer, Boolean, etc. enough?
|
I recently started using the Object aid UML generator plugin for Eclipse and noticed that by default adding of dependency relationships is switched off.
This made me wonder if in most cases they should not be shown or rather that most people don't want to show them, seeming as this is the default setting.
How do I deci... |
I read some stuff like cm bell labs but i couldn't get it all. How does it work really? What is the logic in that?
|
A little background on where this question is coming from. In my current .NET application I'm working on some features related to archiving a certain type of business entity called a "Project". Depending on the situation what has to be archived, and the exact actions involved in archiving can vary wildly. My basic idea... |
I've been using Reactive Cocoa (by GitHub), a Functional Reactive Programming API for use with the Cocoa libraries for a while now, but have just read "Out of the Tar Pit", the paper that supposedly presents the concepts behind it, and I am a little confused.
The paper presents (as I understand it) Functional Relationa... |
what is LPCTSTR and LPCTSTR-like (for instance HDC) and what it does stand for?
|
I've been working in the same software development department for a few years now. In that time, the average stay of a developer has been 6-9 months. A handful have been around for over 2 years, but the majority of our 20 or-so developers come and go at a relatively high rate.
As a result, the majority of our project... |
I have worked for various organizations many of whom call their environment that comes after the test/developer environment and before the staging and/or production environment either model or QA.
They all seem to use this term interchangeably, however, is there any technical difference or should there be a difference ... |
What is the best and most efficient way to set up two versions of the same website?
I want one version that is online and open for everyone to use but I also want a developer version where I can develop and test new things instead of doing that against the ftp.
Currently I have MAMP setup on my developing machine and I... |
I had learned that following piece of code is bad because it is obstrusive javascript and mixes presentation with logic:
<a href="" onclick="archive()">archive</a>
The best practice was to add some sort of identifier to the link element and then bound an event to it on a separate file. Something among those lines
$("#... |
I recently learned that when merging two branches in git, if there are changes on two adjacent lines git declares this a conflict. For example, if file test.txt has this content:
Line 1: A
Line 2: B
Line 3: C
Line 4: D
and in branch master we change this to
Line 1: A
Line 2: B1
Line 3: C
Line 4: D
while in branch te... |
Question:
Can a mere entry level programmer become a mid or senior level programmer working in a company as the only programmer without a mentor?
Background:
I was hired as an entry level programmer for a mid size company that does not do programming except for internally. I am regarded as a genius inside the company ... |
So I have a quick question about the linear probing method of collision resolution in hash tables. So by definition a linear probing method would look like:
while (hashTable[hash] != null)
hash = (hash(key) + step) % tableSize;
But in my case I know exactly what the table size will be, I know all the keys, so I'm ... |
I am hoping this is the correct stack exchange to be asking this, here goes.
I am building a new website whereby it implements its own custom login system. You simply register your username, email password etc. Then you're free to log in with the option of clicking "remember me" to save the hassle of logging in every t... |
I need to develop an algorithm for finding all the local maxima in a two-dimensional array: how to search for local maxima in the the most efficient way? Are there algorithms about it?
Moreover, the algorithm should be able to handle even the "flat" peaks, that is it should find the central coordinates of each peak. He... |
I am looking for an explanation on just why XML needs to be validated. I have been testing DTD's and Schema's for the past month and recently tried to find out why I am doing this. I know it makes the XML better and more Semantic but what are the overall benefits of validating XML?
|
I know there are similar questions to this one, and I've read most of them. Most of the answers to these questions are talking about "cost-effectiveness" and "time-saving" aspects of the frameworks, which are huge reasons in favor of using frameworks.
I'm a pretty new .NET developer and I'm trying to learn stuff like W... |
I'd like to know if it makes sense to divide the project I'm working on in two repositories instead of one.
From what I can say:
Frontend will be written in html+js
Backend in .net
The backend doesn't depend on frontend and the frontend doesn't depend on the backend
The frontend will use a restful api implemented in ... |
I have a Person class with a one to many relationship to Employment. A Person in the CRM can have multiple Employments (historic data).
My current REST URI for this class looks like this:
http://domain/persons GET [collection]
http://domain/persons/{id} GET [resource]
http://domain/persons/{id}/employments GET [collect... |
I' creating a client server application in which I need to update a particular database. I'm using python with MySQL. There are two options:
I use a client.py and server.py, the client.py can send data packed into JSON to the server, the server.py will handle the database and send query data back in the form of JSON.
T... |
I'm working in a small team with up to 5 (web)developers. Because our team is growing frequently and we ran into problems with multiple people working on the same code we decided to set up a VCS.
Current Situation
Currently we are working with a central development server (LAMP). So every developer works on the same co... |
I am a mathematics student and am just starting to learn about programming. I am stuck on a particular program I am trying to write for fun. I want to find an algorithm to create all possible column vectors of size N containing only ones and zeroes and combine them in one large matrix by putting all the columns after e... |
I am wondering if it is reasonable to write closed source, paid web apps in Javascript (JS MVC Frameworks like AngularJS, Backbone, Knockout, ...)? I'm concerned because in this type of frameworks you use typically a REST backend for CRUD operations and the majority of business and application logic happens in Javascri... |
I'm reading 97 Things Every Programmer Should Know, now I'm positioned in "Apply Functional Programming Principles", and there is a paragraph that says:
...A leading cause of defects in imperative code is attributable to
mutable variables. Everyone reading this will have investigated why
some value is not as expec... |
I'm maintaining an open source framework (in Python on *nix platforms if that matters) for the first time in my life. It is pretty much pre-alpha, not much more then a scientific proof of concept, yet. But it is also already used in production by another department because it is the only framework globally that approac... |
What's the most secure method of performing authentication in a single paged apps? I'm not talking about any specific client-side or server-side frameworks, but just general guidelines or best practices. All the communications are transfered primarily through sockJS.
Also, OAuth is out of the question.
|
I am stuck on the following problem. I want to find an algorithm that finds all possible permutations of a certain numbers of distinct digits and then put them in a large matrix for instance. For instance for the digits 0, 1 and 2 I want to get the matrix:
2 1 2 0 1 0
1 2 0 2 0 1
0 0 1 1 2 2
Here they are in order but ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.