instruction stringlengths 34 19.9k |
|---|
I would like to ask on method parameters design consideration. I am usually deciding between using individual variables as parameters versus grouping them to a class or dictionary as one parameter.
Is there such a rule when you should use individual parameter against using a class or a dictionary to group the parameter... |
I was thinking about ways to improving my commit practices.
Is there any co-relation between no. of source code lines and no. of commits?
In a recent project that I was involved in, I was going at 30 commits per 1000 lines.
One typical file from the project has these stats
language: JavaScript
total commits that includ... |
I am planning to create a web solution for the desktop, I would be dividing my task into three steps
Design
Coding
Automated use case
I am wondering if in the future I have to port my web solution as mobile phone native application. How would I do that? Will I go back again to the design phase to redesign or will I j... |
I have the need to phase out an obsolete method. I am aware of the [Obsolete] attribute. Does Microsoft have a recommended best practice guide for doing this?
Here's my current plan:
A. I do not want to create a new assembly because developers would have to add a new reference to their projects and I expect to get... |
I understand the idea of a callback, where I pass a function into another function and that function then uses the supplied function at will.
I am struggling to understand deferred callbacks, even after googling it.
Could someone provide a simple explanation please? I program in Ruby, but also know C/C++ a bit, but mos... |
Possible Duplicate:
Extracting user requirements from a person who does not know how to express himself
As a hobby freelancer I'm new to this. I've never had a non-technical client before explain to me what his future website is supposed to do.
A person wants me to make a website for him and he basically explained t... |
I've got an SVN repository of a PHP site and the last programmer didn't use source control properly. As a result, only code since I started working here is in the Repo.
I have a bunch of old copies of the full code base saved in files as "backups" but they're not in source control. I don't know why most of the copies ... |
I am trying to set-up a simple SVN workflow at home. I am new to subversion (and programming) so I have been reading the official PDF documentations but still not sure about how to set-up my repository.
I am working mainly with python, bash and rsl (Renderman Shading Language)
So I already have a /dev structure on my d... |
I've been wanting to find a solid answer to the question of whether or not to have runtime checks to validate input for the purposes of ensuring a client has stuck to their end of the agreement in design by contract. For example, consider a simple class constructor:
class Foo
{
public:
Foo( BarHandle bar )
{
Fo... |
C is a language written between '69 and '73 according to WIkipedia. I imagine it made programming a whole lot easier and opened the gate for other programming languages.
My question, however, is what programming language dominated the market before C appeared? I'm tempted to say fortran and/or BASIC but I wasn't even a... |
I've noticed more and more mentions (both in posts here and in actual job descriptions) of programmers' "portfolios" - typically their public profiles on sites such as this, GitHub, etc.
How important is this, and would companies (startups in particular) reject (or immediately discard without even interviewing) otherwi... |
In my new web app I'm going to allow social login through Twitter (maybe), Facebook and Google and I'm in search of the best way to do it.
Actually I'm using Rails with Devise + Omniauth and this is the problem:
Should I ask the user to choose a password so that he can login without a social network?
Or maybe the user... |
Can my MIT/BSD licensed, open source project, or a closed source project I build and sell, execute a command, where the command is a program released under the GPL?
I would not be distributing any version of the GPL'd program, either source code or binary. I would be telling the customer/end user that they need to have... |
I'm a young upstart programmer and I've never actually seen a database. But computers in large part come in boxes, not in cylinders so I was wondering why they are always represented as a cylinder when people show their architecture drawings.
Is there a reason why or is it just tradition to draw them like that?
|
If this is not the right place to ask this question please inform where it would belong, to change it...
I have a doubt for the correct word or concept in english language [not my native], about the relationship of
language to framework
for example i work with
objective C, with the cocoa touch frame work || python... |
CoffeeScript is a language that transpiles to JavaScript, with a clean syntax, inspired by Ruby. Is there a similar language that transpiles to C, allowing for more readable code without compromising on performance? If nothing like that exists, is there a good reason for not creating it?
|
On HTML5 Boilerplate they use this code for jQuery:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-...
What's more readable:
if (!window.jQuery) document.write(...);
or
window.jQuery || document.write(...);
|
Is catching an error with try ... catch a better practice than catching an error with proper analysis/error check? For instance, removing from an empty list: Does surround with a try catch clause considered as a more efficient way than testing if the list is empty beforehand?Or is it the same? Thanks.
P.S: If a similar... |
I've got a site with ~500 registered members, 300 of which are what you'd call "active". Site data is kept in a MySQL dbase.
I'd like to add a myBB forum to the site, but this question applies to any forum really.
What I very much want to avoid is requiring my users to register both on the site and on the forum because... |
Why do we need private variables in classes?
Every book on programming I've read says this is a private variable, this is how you define it but stops there.
The wording of these explanations always seemed to me like we really have a crisis of trust in our profession. The explanations always sounded like other programm... |
In Document based NoSQL to create tables (AFAIK) I need:
Create such many as many rows in table documents with same ID field (that will be table id) and each time need to set the columns (for each document).
Then you first search documents by id (table) and next search what you need in the selection.
Please correct if ... |
I work for a software development company where the development work has been off shored to us. The on shore team handle the support and talk directly to the clients. We never talk to the clients directly we just talk people from the on shore team, who talk directly to the clients.
When requirements come, the on shore ... |
Private variables are a way to hide complexity and implementation details to the user of a class. This is a rather nice feature. But I do not understand why in c++ we need to put them in the header of a class. I see two annoying downsides to this:
It clutters the header from the user
It force recompilation of all clie... |
I am considering to sponsor a development of some particular features in some Open Source tools. I would like the results of the work to be available publicly, and if possible, to be included in the main product line. The features are usually something which is of general use, but not very critical, and no one has curr... |
I will be adding a feature to the software and have to update or modify some of public API of the present open source software.
What are steps which could be taken to ensure the compatibility of the software.
what are the testing methods which are used in open source world to test the newly added features??
Open Sourc... |
This is really two questions. Im doing a project for the university for storing baseball players statitics, but from baseball data I have to calculate the score by year for the player who is beign displayed. The background is, lets say 10, 000 users hit the player "Alex Rodriguez", the application have to calculate 10,... |
A quick introduction
My college semesters include a 8 week project working for an actual company with a software need in order to get some much needed practical experience. I have just started such a project with 5 other students. We're required to spend roughly 40 hours a week per student on this project. We're workin... |
There are many ways to expose a Java web application to the consumer: application container (JBoss etc), servlet container (Tomcat etc), OSGi (Knopflerfish etc), self-executable WAR (Winstone etc) and so on. Are there any clear considerations where one approach should be favoured over another?
As an example, could a c... |
I have mostly worked on simple java programs and compiled and run them with Eclipse on Windows. So, I have no experience of using command prompt for compiling Java projects and do not have much info about what actually happens beneath the play button in Eclipse.
Now I have to submit a Java application which will have b... |
I have seen many organizations looking for developers who have good command over Facebook, Google and other API's. Now I am a bit confused about it. I have developed Facebook fanpages, embedded facebook buttons to websites and used google maps API too but the thing is that these API's are very large to completely maste... |
The downsides of Mainframes is well trodden ground; expensive, legacy, dwindling community, etc.
I'm not particularly interested in the downsides, but I am curious if there are any benefits to mainframe hardware/software over the current Intel/AMD & Linux/Windows environment.
I've been told that MFs are particularly g... |
Recently I've noticed myself implementing pattern similar to the one described below. Starting with interface:
public interface IUserProvider
{
User GetUser(UserData data);
}
GetUser method's pure job is to somehow return user (that would be an operation speaking in composite terms). There might be many implementa... |
I recently found out about strong typing in VB.Net (naturally it was on here, thanks!) and am deciding I should take another step toward being a better programmer. I went from vba macros -> VB.Net, because I needed a program that I could automate and I never read anything about strong typing, so I kind of fell into the... |
I'm wondering if there is a good extant pattern (language here is Python/Django but also interested on the more abstract level) for creating a business logic layer that can be created without coding.
For example, suppose that a house rental should only be available during a specific time. A coder might create the follo... |
I have been working on a website containing 3d maps, virtual 3d tours, etc. All of the content is large like images and video.
The problem is the site performs well under normal speed connections but it take more time to load if network is busy or the internet connection is slow. How can I describe this to the custome... |
I'm using the following code in my application, and it's working fine. But I'm wondering if it's better to make it with malloc or to leave it as is?
function (int len)
{
char result [len] = some chars;
send result over network
}
|
I am new to JavaEE and am faced with a tight situation here.
I have to develop a Java application for (CRUD) handling records and saving and loading an XML concerning that record. Obviously, I won't be asking you to do this for me. What I would be asking you is to give me some hints/pointer. Initially I thought JAXB wo... |
I find myself constantly running into this expression "don't reinvent the wheel" or "never reinvent the wheel" when I ask some questions on SO. They tell you to use some frameworks or existing packages. I know where this attitude is coming from since it's unwise to waste time on something others have already solved. ... |
I intend to make a web application that displays 3d environments that can be navigated by dragging(with a finger or mouse depending on the platform). The web app will render 3d environments of development sites including contours, water pipeline locations, buildings etc.
I am trying to decide what technology/libraries ... |
Defect containment metrics, such as total defect containment effectiveness (TDCE) and phase containment effectiveness (PCE), can be used to give a good indicator of the quality of the process. TDCE captures the defects that are captured at some point between requirements and the release of a product into the field, ind... |
(Let me know if this is the wrong SE for this)
Why is a Here Document (or Heredoc) called that? Wikipedia didn't have anything to say on that particular subject. I did find unix docs describing a "Here is document", is that the original form?
|
I am developing a system for mailing which has a account id/password to login and I need to store the smtp server account and password for sending mail. Since the mail is auto send I can't request the user input password/id each time when sending.
Therefore, is storing the user account id/password (system b password) i... |
For small size projects, is it worth following the SDLC? is SCRUM/agile development a better approach?
Edit: The project I have in mind is a small change but it will affect multiple layers/parts of the application, so there will be 2 or 3 developers involved each from a different team, then the code will be integrated ... |
We're having a few discussions at work around the naming of our database tables. We're working on a large application with approx 100 database tables (ok, so it isn't that large), most of which can be categorized in to different functional area, and we're trying to work out the best way of naming/organizing these withi... |
Scenario: We have both Winforms and MVC code that is being used to work on a nation wide multi-user platform that does lots of logistics for lots of users. Tax rules change per state and even per city or county. These tax rules make a huge difference for our industry.
The other issue is that rules can change based on ... |
I just finished coding a (basic) ray tracer in C# for fun and for the learning experience. Now I want to further that learning experience. It seems to me that ray tracing is a prime candidate for parallel processing, which is something I have very little experience in. My question is this: how do I know the optimum num... |
Does the saying, "form follows function" hold true in programming or language-design? Why or why not?
|
Scenario:
You push to production
The push broke multiple things
That same build did not break qa or dev
As a developer, you don't have prod access.
There is lots of pressure from above to get things working agian.
Specifics:
PHP/MVC application that is API-driven in Zend.
Deployed to a few servers.
My question:
W... |
I have just started working with a team that has picked up some aspects of Scrum (two week timeboxing) but not others (the team does not currently agree to all estimates or to the number of points in a sprint, but I'll change this soon.) The product owner is also a technical resource (scientist) with some development ... |
I would know if someone can suggest a good approach to convert a word document that contains forms in a web app, specifically in an application built with WaveMaker.(but I'm curious also with a general approach not strictly dependent on the technology that I have mentioned).
For example, if I have a page in a word docu... |
In the .NET Framework, at least in the C# language, we have two "versions" of the string type:
"string"
"String"
It appears that they are interchangeable, but are they really? If they are not interchangeable, is it generally better to use one instead of the other, and under what circumstances?
|
I basically have the gist of TDD. I'm sold that it's useful and I've got a reasonable command of the MSTEST framework. However, to date I have not been able to graduate to using it as a primary development method. Mostly, I use it as a surrogate for writing console apps as test drivers (my traditional approach).
Th... |
Both languages have the same syntax.
Why does C have the weird * character that denotes pointers (which is some kind of memory address of the variable contents?), when PHP doesn't have it and you can do pretty much the same things in PHP that you can do in C, without pointers? I guess the PHP compiler handles this inte... |
I am looking for (or attempting to design) a technique for matching nodes from very similar graphs based on the structure of the graph*. In the examples below, the top graph has 5 nodes, and the bottom graph has 6 nodes. I would like to match the nodes from the top graph to the nodes in the bottom graph, such that th... |
When reading the famous SICP, I found the authors seem rather reluctant to introduce the assignment statement to Scheme in Chapter 3. I read the text and kind of understand why they feel so.
As Scheme is the first functional programming language I ever know something about, I am kind of surprised that there are some fu... |
I am the only person on my team that use TDD. How do I make them to use it?
I am annoyed that when I pull, someone's code will break my tests and I am the one who has to fix them.
Will using github, fork and pull request solve this problem, so that they need to pass the test before the pull is accepted?
I am not the pr... |
Possible Duplicate:
Why are statements in many programming languages terminated by semicolons?
I just found out that R Programming Language, which is somewhat belong to the C family (I'm not sure about this but it uses {} instead of begin end), uses a new line as a delimiter for a new line of code instead of the sem... |
I am developing software that uses many calls to a server. On a client side it's a Silverlight application. Almost every time a user clicks on a button in it, it sends 1-5 WCF calls to a server. There can be up to dozen or so users at a time. The server is a database server that serves data to a client. I am an interme... |
I'm currently learning C#, but wondering whether it is beneficial to learn some C++ before/at the same time as in order to understand the concepts a little better? I've got a C++ book and it does seem rather useful, especially explaining pointers and references.
|
I need to generate debug output in a java appliation that cannot be debugged by placing break points and traces. I've thus far been placing the debug flag as a static variable in one of the classes and then accessing it from all other classes. But this I suspect will eventually cause massive issues later on. What's the... |
The code is a complete mess of a combination of classic ASP/ASP.NET. The scrum consist of us patching up the big mess or making additions to it. We are all too busy doing that to start a rewrite so I am wondering..
Where is the part in Scrum where the developers can have the power to say that enough is enough and deman... |
We (and the JS SO chat room) had a talk with @rlemon some days ago about his Little-XHR library about error handling.
Basically, we wanted to decide which error handling pattern should be used:
xhr.get({
// Some parameters, and then
success: function(data) {},
failure: function(data) {}
})
Or:
xhr.get({
... |
The rule of 3 (the rule of 5 in the new c++ standard) states :
If you need to explicitly declare either the destructor, copy constructor or copy assignment operator yourself, you probably need to explicitly declare all three of them.
But, on the other hand, the Martin's "Clean Code" advises to remove all empty constr... |
I've been working in multiteam groups for as long as I've been a web developer, and in my experience, a team can be a lonely soldier or several people; generally a company will have multiple teams working on different projects and once the project is out in the wild, any team can perform maintenance on it.
This is a si... |
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, separate data within two differents DB, one for sensitive data and another for not sensitive data, or both or another approa... |
Let's assume you are convinced that the extra time spent unit testing has merit and improves production. Does that still hold up when everyone working on the same code doesn't use them? This question makes me wonder if fixing tests that everyone doesn't use is a waste of time. If you correct a test so the new code will... |
I am aware of the fact that TFS 2010 ultimate edition can create and validate architecture diagrams. For example, I can create a new modeling project > add Layer Diagram > Add Layer called View > Add BL Layer > Add DL layer.
Then I can validate this architecture as part of the build process when someone tries to check... |
I studied computer science near the end of 1980s, and wasn't taught OOP that formally.
With Pascal or C, when I understand the top-down design of functions, and the idea of black box, then everything just seem to make sense, as if there is a "oh I get it!" -- some kind of totally getting it and enlightenment feeling.
B... |
Our application uses database (mostly Oracle), and database is at the core. Each customer has its own database, with its own copy of application. Now with each new release of our product, we also need to update the database schema. These changes are adding new tables, removing columns, manipulating data etc. How do the... |
Just wondering whether dynamically built HTML layout is fine from SEO perspectives? So let's assume e-commerce engine and its most popular page - products catalog. So 90% of the page is built using AJAX and MVVM library knockoutjs which builds HTML on the fly on the client side. So how search bots would parse such cont... |
I've got a nice MVC set up going but my website requires some views that don't map directly to a model. Specifically I've got some generic Reports users need to run, and now I'm creating a utility for comparing some system configurations.
Right now the logic is crammed into a Reports Controller and I'm starting a Comp... |
It occurs to me that the ModelBinder mechanism in ASP MVC
public interface IModelBinder {
object BindModel(System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext);
}
Is insanely powerful. What are some cool uses of this mechanism that you've done/seen?
I guess since th... |
My team is getting up to speed with Scrum, but most of us are more familiar with non-agile or "pseudo-"agile methodologies. The part that is the biggest hurdle for us is running an efficient Sprint Planning meeting where we break our backlog items into tasks, and estimate hours. (I'm using the terminology from the VS2... |
Background
I was just asked in a tech interview to write an algorithm to traverse an "object" (notice the quotes) where A is equal to B and B is equal to C and A is equal to C.
That's it. That is all the information I was given.
I asked the interviewer what the goal was but apparently there wasn't one, just "traverse"... |
I am currently learning Javascript, and there is one element of the syntax that I can just not seem to nail down. That element is adding semicolons at the end of each line. I have learned Python and Ruby, and written a ton of both, so the lack of semicolons is stuck in my mind! Is there a way to drill that (or even any... |
I have been seeing opportunities go past me for just 1 reason: not having professional industry experience. I say to many employers that I'm capable of doing the job and show them the work I've done during the academics and also several personal projects which I took extra time and effort to teach myself the new indust... |
Any idea on how to build an application that provides unique keys each time it get called by another process.
Calling process isn't my problem here, my problem is how to sync between two(or more) processes and preventing it from providing the same key to both of them.
I'd really appreciate your help in this issue, ple... |
I have written a program that can rapidly (within 5 sec on a 2GB RAM desktop, 2.33 Ghz CPU) differentiate between structured text (e.g English text) and random alphanumeric strings. It can also provide a probability score for the prediction.
Are there any practical applications/uses of such a program? Note that the pro... |
I want to save the configuration of my project which includes
Screen size
Screen position
Folder paths
Users settings and so on.
The standard places where you can save these are configuration values are:
Registry
INI files
Personal files (like *.cfg)
How do you choose between these places? Also, are there any pros ... |
Am looking for a good resource on learning the concepts behind NoSql databases.
Most things I find are related to a specific technology (MongoDb, CouchDB etc) but I'm after all the concepts behind NoSql instead of focusing on a specific area (some are graph DBs, some key-value etc).
Can you share from your experience ... |
Background
I am a working software engineer who is in the midst of seeking out a new contract for the next year or so. In my search, I am enduring several absurd technical interviews as indicated by this popular question I asked earlier today.
Even if the questions I was being asked weren't almost always absurd, I wou... |
I see the term "enterprise" being thrown around software developers and programmers a lot and used loosely it seems.
en·ter·prise/ˈentərˌprīz/
Noun: A project or undertaking, typically one that is difficult or requires effort.
Initiative and resourcefulness.
Can someone please clarify what this term actually encompas... |
I have a simple form for the user to sign up to my site; with email, username and password fields. We are now trying to implement an ajax validation so the user doesn't have to post the form to find out if the username is already taken. I can do this either on keyup event or on text blur event. My question is, which of... |
What's the difference between these?
Recursion
Corecursion
On Wikipedia, there is little information and no clear code explaining these terms.
What are some very simple examples explaining these terms?
How is corecursion the dual of recursion?
Are there any classic corecusive algorithms?
|
One way of looking at type safety is that it adds automatic tests all over your code that stop some things breaking in some ways. One of the tools that helps this in .NET is generics.
However, both WinForms and WPF are generics-free. There is no ListBox<T> control, for example, which could only show items of the specif... |
I work with someone who insists that any good software engineer can develop in any software technology, and experience in a particular technology doesn't matter to building good software. His analogy was that you don't have to have knowledge of the product being built to know how to build an assembly line that manufact... |
One of the features in our project is to implement a comparison algorithm between two versions of text and provide a % change between the two versions. While I was researching, I came across google java-diff-utils project.
Has anyone used this for comparing text using java-diff-utils ? Using this utility, I can get a ... |
This isn't really Dapper-specific, actually, as it relates to any XML-serializeable object.. but it came up when I was storing an object using Dapper.
Anyways, say I have a user class.
Normally, I'd do something like this:
class User
{
public string SIN {get; private set;}
public string DisplayName {get;set;}
... |
I was wondering how computers do this.
The most logical way I can think is that they are iterating trough all elements of the list until they find one that matches the condition :)
For example if you call function_exists(), PHP should iterate trough all defined functions until it meets the one that matches the name you... |
Are there any prolog interpreters that can functionally decompose your 'programs' in order to improve efficiency?
I know there's been research on prolog interpreters that reach near-C speeds through parallelism (the kind that a typical C programmer can't "see"). Does anyone know more about this topic?
|
There is a provision for try-catch block in javascript. While in java or any other language it is mandatory to have error handling, I don't see anybody using them in javascript for greater extent. Isn't it a good practice or just we don't need them in javascript?
|
I implemented the publish subscribe pattern in a JavaScript module to be used by entirely client-side oriented JavaScript objects. This module has nothing to do with client-server communications in any way, shape or form.
My question is whether it's better for the publish method in such a module to be synchronous or as... |
I'm working on the backend of a java web application. We have a document repository (Fedora Commons specifically) where we house xml files. I want to abstract the API of the repository internally so that we aren't tightly coupled to one product. I'd also like to give the flexibility of connecting to to a repository via... |
I started a project (a Windows based timetable program that helps you stay organised with your subjects and assignments).
The problem is that I'm not sure how I should manage this project and what order to build things. I.e. Should I build all the different interface elements then write the code or should I make an in... |
I program primarily in ColdFusion but this is a general OOP question.
Is there any benefit to using:
getProp() {
return prop;
}
setProp(val) {
prop = val;
}
As opposed to simply
obj = new Obj();
obj.prop = "1";
|
I am looking to build a very loose authentication system that can track a user and link submitted data/comments to a specific user. The submissions are essentially anonymous, but a user may want to edit his submission/comment at a later date.
I want the experience to be as smooth as possible so do not want to ask user... |
I've been asked to audit a PHP application. No framework, no router, no model. Pure PHP. Few shared functions. HTML, CSS, and JS all mixed together. I've discovered numerous places where SQL injection would be easily possible. There are other problems with the application (XSS vulnerabilities, rampant inline CSS, code ... |
Possible Duplicate:
Learning to program without a computer
I have a bit of experience programming (6 Months) and am soon to go on a 2 month trip where I will be without a computer, but with lots of spare time. Is there a way I can keep programming (or learning to program) even without a computer? Should I read langu... |
Which of these two programmers is "better", from a managerial standpoint?
The first programmer is Albert. You tell Al to make a system that will pass you the salt at the dinner table. He does it in less than a day. It works fine.
The second programmer is Ben. Ben is told to make a program to pass the salt, and after tw... |
I need to build complex sql queries programatically, based on large filter conditions.
For example, below are few sample/hypothitical filter conditions, based on which i need to fetch users
Country: india
States: Andhra Pradesh(AP), Gujarat(GUJ), karnataka(KTK)
Districts: All districts in AP except 3 district, 5 any di... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.