instruction stringlengths 34 19.9k |
|---|
I just finished a redesign for a website that is currently using Google Analytics. I want to continue to use Google Analytics, but I'm not sure if I should create a new profile for the new site or simply use the old UA number.
The new website has a completely different URL structure and much of the content has been upd... |
Why do trees grow downward in computer science?
I have a feeling it goes back to a printer, and that a program traversing a tree first prints the root, and uses the notion of a bottomless stack of paper to express the indefinite levels of recursion that might be encountered.
References:
Trees grow downward, having the... |
I'm trying to develop a model to work on an assignment problem in the firegifhter area. Given n firefighters, m trucks and z ongoing fires, each with a danger level, try and allocate the resources in the best way.
Is there some work on this i can read to try and understand how should i formulate my problem (costs, and ... |
I'm an iOS developer (freelancer) and i want to know how much cost to build an app? and how should i do to estimate the price? like this app http://www.finalcad.fr/en/index.html
|
In Java, there are multiple languages that compile to Java bytecode and can run on the JVM -- Clojure, Groovy, and Scala being the main ones I can remember off the top of my head.
However, Python also turns into bytecode (.pyc files) before being run by the Python interpreter. I might just be ignorant, but why aren't ... |
I am reading the paper "Efficient Reconciliation and Flow Control for Anti-Entropy Protocols"! , I couldn't clearly understand Section 3.2 "Scuttlebutt Reconciliation". Here I extract out some sentences from the paper, which especially confuse me.
If gossip messages were unlimited in size, then the sets contains the e... |
I feel like I have a reusable "something" here and I'm not sure whether to think of it as a pattern or an algorithm (or neither).
It's characterized by having an unknown amount of work to accomplish a task because the subtasks can encounter various conditions which cause them to add "Issues" to a global queue.
Then, th... |
I was (casually) researching semantic / ontology based approaches to technical documentation, when I stumbled upon this gem:
Literate Programming and the Semantic Web are ideas from different times, which do have a connection.
The linked paper, Literate Programming in XML by Norman Walsh, discusses XML technologies t... |
Looking for the recent and powerful upcoming programming languages over net, I came across Ceylon. I dropped in at ceylon-lang.org and it says:
Ceylon is deeply influenced by Java. You see, we're fans of Java, but we know its limitations inside out. Ceylon keeps the best bits of Java but improves things that in our e... |
I've been doing some reading about DNSSec and am interested in the algorithm that they chose to use when splitting the trusted key up between the 7 Trusted Community Representatives (TCR).
I unfortunately can't find any information about the algorithm itself anywhere.
Is it just an implementation of the Shamir Secret S... |
Are there any situations where having a "data model" in which all of the entities are instances of a Map<String, Object> would make any sense?
How do you explain to someone why having such a "data model" is not such a good idea? It seems like it's an absurd approach to me, could I be missing something?
|
I'm trying to understand the basic concepts of algorithms through the classes offered at Coursera (in bits and pieces), I came across the deterministic linear time selection algorithm that works as follows:
Select(A,n,i)
If n = 1 return A[1].
p = ChoosePivot(A, n)
B = Partition(A, n, p)
Suppose p is the jth element ... |
Following on from this question - how do you explain to someone that this is just crazy!:
boolean someMethod(Map<String, Object> context) {
Object object = context.get("someProperty")
Object another = context.get("anotherProperty")
return object.toString().equals(another.toString());
}
Apparently the re... |
I'm wondering if someone has done some experiments correlating code metrics (SLOC, Cyclomatic Complexity, etc) with bug density in Object Oriented applications.
I'm not looking for experiments that only prove or disprove a correlation, but on both. I'm not trying to find a silver bullet as I believe that the bug densi... |
When I was reading the summary of previous work in Dogsa T, Batic D. The effectiveness of test-driven development: an industrial case study. Software Quality Journal. 2011;19(4):643-661. it struck me that the measurements used in a lot of studies around TDD are based on things like lines of code, defects and time spent... |
I'm studying an approach to understand better how the continuous integration workflow fits better in a software development company with the scrum method.
I'm thinking something like this:
Would that be a nice workflow?
|
Apparently less than 1% had javascript off in 2010:
http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/
So is it worth it to still support browsing without javascript?
For example:
Form submissions. Normally I would set up click or change events on form elements and just update t... |
I have been learning Java. And still after a prolonged time I don't know why the name of the folder is "bin" where one find all the tools for java?
Is there is any logical reason behind that?
I have also noticed the same in .Net framework also.
|
I am learning OOP. I have studied much about encapsulation but the more I read the more I became confused.
I understand we hide (by making private) data and expose it to user of class (other developers) as properties or methods. I also understand by encapsulation we hide details.
In an article (http://www.csharp-statio... |
I'm using the WTFPL in my personal projects that I have published on GitHub.
Currently I'm using the license verbatim, but I have a suspicion that I shouldn't be leaving the third line:
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
in there, and instead should use my name instead of Sam's.
But the license is very ... |
C# WinForms:
A Combobox with some items in in.
A spread sheet with some items in it. Each row also has a check-box so users can select them.
User picks an items in the combobox and clicks a Save button. It means associate that Combobox item to those selected items in the spreadsheet.
Q1: What's a good structure I can u... |
In implementations of the Scheme programming language (R6RS standard) I can import a module as follows:
(import (abc def xyz))
The system will try to look for a file $DIR/abc/def/xyz.sls where $DIR is some directory where you keep your Scheme modules. xyz.sls is the source code for the module and it is compiled on the... |
I know there have been a number of discussions of whether break and continue should be considered harmful generally (with the bottom line being - more or less - that it depends; in some cases they enhance clarity and readability, but in other cases they do not).
Suppose a new project is starting development, with plans... |
To give some context, I've been a Ruby & Rails developer for the past few years, and just recently started doing quite a lot of JavaScript to add more responsiveness to the apps.
When programming backend, it is quite easy (at least for me), to do most of the stuff test driven and just keep hammering out a bunch of code... |
Right now I'm struggling with this concept of DRY (Don't Repeat Yourself) in my coding. I'm creating this function in which I'm fearing it's becoming too complex but I'm trying to follow the DRY principle.
createTrajectoryFromPoint(A a,B b,C c,boolean doesSomething,boolean doesSomething2)
This function I have say tak... |
I've been trying to implement a text classification system. It needs to read a text file, and extract the words and the word frequency. So far, I've been planning to parse the words, put them in a dictionary and save it to an XML file. I am using C++/CLI.
Is this a good implementation or is there a simpler or better im... |
I recently started using <vector.h> library and I was wondering, since all the operations are already implemented, IF the method of the sorting algorithm is the most efficient one. Everything runs perfect, there is no doubt, but should I worry about its performance?
If I want to sort up to 6-7 million numbers, should I... |
I'm new to Programmers and I am looking to increase my knowledge of programming. Recently, a user on Stack Overflow told me using singletons is a bad idea, that they encourage tight coupling and that they make testing harder.
What prompted this discussion was that every class I've ever written accessed any kind of data... |
I have raised a question on dba.stackexchange.com but as the heart of my question is in fact to do with logic I have raised a more general representation of my issue here. I think it is the right place, apologies if not.
I have a number of objects that are read and written to in a set sequence. I also have four locatio... |
I have a site that has been built from scratch by a few different programmers over time. The first programmer, who built the initial system and database, was not very tech savvy. Other programmers who worked later also did things their own way, taking shortcuts, patching things instead of dealing with root cause issue... |
I'm part of a two-person team that is building a web-based virtual tour application with specific extra functionality that doesn't exist in current applications. This is a summer school project.
The team lead wants this application to be as platform and dependency-agnostic as possible. To do this, we're using Google'... |
I don't understand the benefit to HATEOAS for APIs intended for use by programs (as opposed to humans directly browsing your API). Sure, the customer isn't bound to a URL schema but they are bound to a data schema which is the same thing in my mind.
For example, assume I want to view an item on an order, let's assume ... |
I have this requirement:
The application must allow the Administrator to edit, create and delete Users.
Now, I have heard that each action must go in a functional requirement, and my question is: What of the following statements would be the more appropriate(if any):
1:
The application must allow the Administrator to ... |
We develop a windows application in .NET 4 with a database of MySQL. When we are about to deploy that application, we install the .NET 4 framework in our client, then when installing the .NET Connector for MySQL, it requires a .NET framework 3.5. But the .NET 4 is already installed. Wasn't .NET framework backward compa... |
I am only developer working on a project. The functionality that I have coded works to expectations(desired result) but since I am the only one I don't know if I can do anything better to it. How do I determine if my code is optimized (I want to increase the performance of some features)?
One thing that comes into mi... |
TL;DR : Do functional languages handle recursion better than non-functional ones?
I am currently reading Code Complete 2. At some point in the book, the author warns us about recursion. He says it should be avoided when possible and that functions using recursion are generally less effective than a solution using loops... |
In DDD examples it seems the common method for developing the domain model is to sit with domain experts and iterate over versions of the model, say on a whiteboard, continually modifying it and changing it until presumably an agreement is made on how the model looks.
On my project I've spent a couple of days with a do... |
From the essay Programming Languages Explained by Paul Graham, published in Hackers & Painters:
The high-level language that you feed the compiler is also known as
source code, and the machine language translation it generates is called object code.
From the Wikipedia article on object code:
Object code, or someti... |
So I have a function that takes two dates. The SQL query gets all the results between the two dates. I currently have my function setup as such:
function myFunc(start, end)
Where start is the most recent date and end is the oldest date.
Is this intuitive/correct or is there another naming/ordering convention I sho... |
What design and implementation issues did programmers have to solve when they decided first to use structures and classes?
When did this happened and who were the pioneers behind these ideas?
Note, this is double question, because structures and classes are related. I realize that structures are quite older than classe... |
Part of our ERP system is a sub-system for running background jobs. We track a variety of meta-data about our jobs in a table including timestamps for submitted, started, and end times.
I'm creating a report showing the performance of our job system, detailed by day. One KPI is maximum # of jobs running at once. The ... |
Why do some open source projects not accept pull requests, but require contributors to email patch files only?
e.g. Git
Although they publish code in github or other distributed scm hosting.
It is not interactive nor convenient to send patch files.
Patch file is an old-fashioned way.
Pull requests are interactive. Othe... |
With todays browser extensions/tools is it not easily possible for a user to edit the html/css settings of a website and so enable some disabled buttons etc... to gain access to not permitted areas?
|
I'm a new programmer (only been learning for about a year) and in my goal to become better at it I have just recently learned about TDD. I wanted to get into the habit of using it since it seems very helpful. I wanted to check and make sure I'm using it correctly.
What I'm doing:
Think of a new method I need.
Create a... |
tl;dr:
I've found myself hosting a bunch of sites running on the same web framework (symfony 1.4). Would it be helpful if I moved all of the shared library code into the same directory and shared it across the sites?
more
I see some advantages to this:
Each site takes up less disk space
Library updates (an unlikely sc... |
Are there good means for allowing scripts from two or more domains to collaborate in the same browser page? I want to create an extensible platform, where I provide the model and some views, but also allowing third parties to create their own views as well. The idea is that all model manipulation will be done through i... |
The company where I work is aiming to have a 10% maximum error margin.They expect analysts to not miss the estimate by more or less than 10%.
I don't know what to think about it, since I got nothing to compare it to.
What could be a good baseline to measure if we are estimating too wrong, for more or less?
How much (i... |
I have a method that looks like this:
Public Function NormalizeStreetAddress(country As Namespace.Country,
streetAddress As Namespace.StreetAddress) _
As Namespace.StreetAddress
Dim _streetAddress As New Namespace.StreetAddress = streetA... |
I'm beginning to build an interface for our field techs to close out work orders and we have many different required paper forms for different customers. I had hoped to build a system where i can set up a Page for each form (all in .Net 4.0/wpf and possibly using caliburn.micro if it's not a bad choice), and based on ... |
Can neural network find connections beetween numbers generated by random number generator without knowing about it's seed and predict this rng's next numbers with more sucess then randomly guessing? I really couldn't find any data about this. Thanks
|
http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd
You are not allowed to write any production code unless it is to make a failing unit test pass.
So where do asserts fit into this? If you followed this rule you'd never write an assert without a unit test. But how would you test for the existence of an ass... |
The web world is flooded with CMSes. Some tout their CMS as Web Development Framework. Some say it as Content Management Solution and nowadays i m hearing Content Management Framerowk.
When we hear "Framework", it sort of sounds like more complex and sophisticated.
Is there any specific difference between these two i... |
I have been working on a Mysql db design which keyword based search seems to be necessary. Main table has two columns:
id | Title
For each entry, users will be required to enter 4 or 5 keywords. I think using a seperate table for keywords would be better. I would like to learn if there is any difference between these ... |
And No, i am not referring to single variables in loops or exceptions. Lets say pointer/struct names in large c ,c++ programs . Are there any languages where this type of naming is acceptable or is the norm. Or any constructs in c/c++ ( not iterators,loops) where it is implicit.
what is the general practice in handling... |
There are 3 important naming conventions:
with_underscores
PascalCased
camelCased
Other variants are not important because they are not commonly used.
For variables it seems that the one with underscores is the most used by developers so I'll stick with that. I think it's the same for functions.
But what about class,... |
So I was reading about Java Convolve and someone said that it may be faster than the MMX / SSE implementation. In it one of the comments had a kernal array and said it was seperable.
What is a seperable kernel? How is this useful for image processing?
What is MMX/SSE? The wikipedia page lists them as instruction sets.... |
I have a list of temperature levels (0 - 30 degrees) in different parts of a city. I would like to visualize the different temperature levels in the different parts of the city. Hot places should be displayed in red and cold ones blue. If the user zoom out he will get the avarage temperature color of the city and if zo... |
I understand the benefits of test driven development, but have there been any studies that reveal the level of satisfaction with the product or stress levels of the authoring developers with the introduction of unit testing?
I'm looking for case studies, or preferably research papers.
|
I am implementing a server in C for a course project. The server should serve more than one client simultaneously. The description of the project states that fork() should be used to serve more than one client. Each children should write something to a common file. How do I handle this synchronously? Is there any mecha... |
I'm working on a Django project that tracks arts-related activities, and I'm stuck on the human-resources part of things.
(code below) I have a class Ensemble that subclasses Organization. Organization only has one important field, name. Ensemble has another field, players (a many to many relationship). A player is a P... |
I need to write an API to connect to an existing SQL database. The API will be written in ASP.Net MVC3.
The slight problem is that with existing users of the system, they may have a username on multiple databases.
Each company using the product gets a brand new instance of the database, but over the years (the sys... |
I'm having some questions while designing a architecture for a project around MVC. (It's a C++/Marmalade SDK project, I'm not using any particular MVC framework, I'm making one.)
On several articles (like on the original Steve Burbek article) I keep reading the concept "MVC triad" which bogs me since I took this concep... |
I'm using an (C++) SDK (Marmalade) and building a project around the MVC pattern. On my app, user input listeners may be registered on certain UI elements/widgets/etc providing a proper callback function (according to MVC should be a method of a controller, right?).
In this scenario, who should register these listener... |
In many of the services I work on there are a lot of logging being done.
The services are WCF services (mostly) which use the .NET EventLogger class.
I'm in the process of improving these services' performance, and I got to think that logging asynchronously would benefit performance.
I'm unaware of what happens when mu... |
In my current code project, there is an awful lot of constant strings I use to print out error messages.
Hardcoding such strings is generally considered to be bad practice.
Now I'm searching for a "clean way" to include these strings in my program. Therefore I've written a "constants.h" and "constants.cpp" which looks ... |
I am trying to create a voting system like Stack Exchange. Should I create a table and insert values like following and then sum up the "vote" or there are some better ways to do this?
Table name: vote
id userid article_id vote
1 1001 12 1
2 1002 12 -1
3 1003 12 1
4 ... |
This question is based on some testing I've done recently in order to better understand SQL indexing system.
Table with 500k entries, InnoDB engine
This is a simple select query on a varchar field. The name column is not indexed.
After indexing these are the results:
All good until this point. When I'm trying to plac... |
I often catch myself doing code unnecessarily complicated (sad but true). Is there any set of rules, discipline, etc to help avoid that? (excluding the KISS principle, because I know it but often forget when it comes to the real code :)
|
I'm not sure which SE site this belonged on, so I figured I'd try this one.
Whenever I browser the Mac Developer Library at developer.apple.com, on the top right of the window, there's a link for a PDF version.
Has anyone ever downloaded them all and combined them into one file? I want to download the Mac Developer Li... |
I am building a lot of client-side heavy SPA-like apps with VS2010 and MVC3/4. VS2010 Javascript/HTML/CSS editing (mostly javascript) is interminably slow and sluggish. I'd love to use something like JetBrains' WebStorm to edit my .CSHTML files (with embedded javascript, etc. because I am using RAzor to pop in URL na... |
I'm building a messaging solution with the followingsetup: all the messages are saved on a DB, two or more reader processes will read from this DB and send data to other process(es) which will send it over the network.
My approach is depicted below,
The following have 4 sender process with 4 fifos, and 2 readers with 2... |
Say you have a function f that is or contains a critical section. How would you unit test that only one thread can run it at once, that it doesn't have race conditions, and that it doesn't cause a deadlock, etc...?
|
Is there a "modern" bison and flex equivalent which does not require the JVM or .NET or similar "heavy" runtimes?
By modern, I mean for example Antlr and another one in Java I saw but forgot the name of. (I know that for instance Antlr has a C target, but I am toying with the idea of embedding the compiler generator in... |
When selling software online what's the most suitable/secure way to provide activation in order to get rid of pirates copies of the software? Is there any well-known software for this purpose?
|
I'm developing a simple CMS which I'd like to make it open source.
For the file structure, do you think it's safe to use names like:
AppData
FileUploads
instead of
app-data
file-uploads
?
Because I heard some servers have problems with the camelCase.
|
I'm designing a system which listens to JSON RPC calls from clients, piles them up inside a list, and if the list gets full it will store them in a DB and keep receiving calls.
My original plan is to listen to the RPC calls from Perl with the JSON-RPC and put them in an array. The clients do some long polling in anothe... |
I recently saw a recruiting page for a software company where one of the requirements was "Excellent knowledge of C++."
Now, I know this somehow implies as expert knowledge of C++, but where exactly does expert knowledge fit into. Is it the knowledge and experience of (let's say) eight years of programming in the langu... |
First, I realize this question may by somewhat long and vague and I apologize for this. This is probably a basic problem with a short name to anybody who's "got it", but as I find myself lacking in this regard, please bear with me in describing the problem.
I've been doing programming in this way or the other since I w... |
The Clean language uses uniqueness types to handle I/O in a purely functional setting. Why did the Haskell committee go with monads instead? Were there other proposals for handling state that the committee investigated but decided against?
Note: I'm not looking for a holy war between monads and other forms of computing... |
I am new to this and also a new 19 year old PHP developer that just got hired so I am unsure as to how this works. Many companies when developing their websites keep their sites hidden from being indexed. What are some ways html5/css and then php/mysql work is hidden from search engines? If I am not wrong, these are... |
I am reading about a case study about a team that estimates tasks or "story points" as they call them based on the effort needed to complete them.
What the units are these "story points" estimated in? I believe this notion of "story points" stems from a process called "agile development."
|
The feature to implement is to allow a user to select items and apply data update in bulk. It is very similar to JIRA's ability to bulk update a list of selected issues. In my case:
I iterate over the items,
and for each item, I simply call the existing method used for individually updating an item.
Take note, I c... |
Many of us, including me, started their programming life with programs written on home computers, something like
10 PRINT "ENTER RADIUS"
20 INPUT R
30 PRINT "CIRCUMFERENCE="; 2 * R * PI
40 PRINT "AGAIN?"
50 INPUT A$
60 IF A$="Y" THEN GOTO 10
70 END
Of course, the line-number based BASIC was prone for creating spagetti... |
I have read in numerous places that when developing a product you need to take a different approach to when you are developing a project (think "contract" work).
Some differences are:
1) There is no definitive user, but a "user-base".
2) You need to develop the minimal marketable feature set.
3) Scheduling needs to be... |
while (1) {
if (1+1==2) {
print "Yes, you paid attention in Preschool!";
} else {
print "Wait... I thought 1+1=2";
}
}
As a developer, we all have to use loops very frequently. We know that. What I was wondering was, who thought of the idea to have loops? What language intr... |
Ok not really sure if I'm right.
I only recently learned that I needed to have contravariant interface to be able to pass that interface as a parameter in C# and this feature was only added in .NET 4.0.
So obviously there is some reason you can't do this Covariant or Invariant interfaces and it probably has something t... |
I'm wondering if there is a tool that can generate a dependency graph between C language object files and then analyze how to turn that graph into a DAG by modifying code that creates cycles, moving it to other source files.
I've drawn a dependency graph by hand and I could probably make one by using makedepend or some... |
I was wanting to create a graph similar to this in C++:
The one I will implement will have more edges and vertices, but will use this triangle style. I was wanting to create something that I could perform various search algorithms on in order to find shortest paths to selected vertices (or longest without loops etc.).... |
I'd like to try programming with punch cards once in my life. How can I do this?
I'm in my 30s, and grew up entirely in the PC era, programming on computers with screens and keyboards. I want to experience the way my father and grandfather used to work. I imagine the hardware (and probably the cards themselves) are no ... |
...and unmarshalling/deserializing? Wikipedia's explanation leaves me none-the-wiser! I'm a Java programmer, in case the terminology is used differently in different languages.
|
Background: I'm an experienced Java developer, know basic Javascript, HTML, and CSS (and find it easy to figure out how to do something), and have a little experience in Python. I've seen Ruby before and edited a few lines of existing scripts.
I'm curious not so much about any given technology, but mainly about what ... |
I'm trying to work out a good way to manage user submitted content and create a method to determine when spammed/poor content should be hidden.
The aim is to create comment voting similar to youtubes like/dislike comments and if the score is good show the comments, else they're invisible.
Approach
My thought is to do t... |
When estimating (story points) a story that consists on extending a current functionality with a known tech-debt, should we consider the effort that will be spent to refactor the current code or should we estimate independently of this tech-debt?
|
I'm sorry if the title isn't clear, I have no idea about licences...
The thing is that I have created a little app for android targeted at developers. I want to get paid for the app, but I also want to share the code so others can modify it to improve it or to suit their needs.
I think this is somewhat close to minec... |
I've often seen the terms immutable and const used interchangeably. However, from my (little) experience, the two differ a lot in the 'contract' they make in code:
Immutable makes the contract that this object will not change, whatsoever (e.g. Python tuples, Java strings).
Const makes the contract that in the scope of ... |
I was told by a colleague that in Java object creation is the most expensive operation you could perform. So I can only conclude to create as few objects as possible.
This seems somewhat to defeat the purpose of object oriented programming. If we aren't creating objects then we are just writing one long class C style, ... |
I'm looking for general approaches and ideally libraries/tools for scheduling many thousands of recurring jobs.
A simple example is a feed aggregator, where I'd want to repeatedly poll thousands of feeds. I would never want to poll a website more than once an hour (overuses everyone's resources), but I could deal with ... |
On a current project, the powers that be want to have unit testing incorporated into our development cycle to avoid the constant amount of bugs that seem to seep into our code. The problem is that the spaghetti code is 95% percent procedural, which I've never done unit testing with (all my experience with unit testing ... |
In my Programming Language Concepts class it was mentioned in passing that Fortran's original control structures were insufficient. It was alluded that they were too similar to machine instructions for the IBM 704. Was this the case? What exactly made them insufficient?
|
Suppose I am including a feature in my image-viewing software, which opens an image in Photoshop ('Send to Photoshop'), using Photoshop's OLE automation framework.
Am I allowed to use the icon of Photoshop.exe as the image of this 'Send to' button?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.