instruction stringlengths 34 36.1k |
|---|
Greenspun's tenth rule (actually the only rule) states that:
Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
My memory is that there are some papers on the topic, perhaps for Borland's Quattro (spreadsheet) project and p... |
A large system has already been done in visual fox pro. They want to add more requirements to a module and make some changes to the system.At the same time they are thinking about migration to .net. Some parts like report generation has been done in .net using visual fox pro database and loaded in vfp.
Is it a good ide... |
I've heard it said that gantt charts are a relic of waterfall project management techniques.
I typically use an agile-like approach to project planning and tracking progress which provides good visibility into feature-time trade-offs as the project progresses.
We're at the outset of a project in in which, while the e... |
I am in a distributed system project written in java where we have some classes which corresponds to very complex real-world-business objects. These objects have a lot of methods corresponding to actions that the user (or some other agent) may apply to that objects. As a result, these classes became very complex.
The s... |
I'm creating a vector editing program in C++, and I need a Shape interface which other concrete classes will implement. There is a requirement that no implementation inheritance is allowed. The design doc says that if you need polymorphism, use interfaces. If you need code reuse, use composition.
The Shape interface is... |
Code Complete states that you should aways code into a language as opposed to code in it. By that, they mean
Don't limit your programming thinking only to the concepts that are supported automatically by your language. The best programmers think of what they want to do, and then they assess how to accomplish their obj... |
Clean code recommends to name methods to be a verb, and classes to be a noun.
I am developing an c++ application using boost::signal as some kind of event framework, and have defined various events, but naming them to make the code cleaner seems to be problematic.
So, how to name event types?
|
I want to contribute to open source projects on Github. Mostly, I'd like to just start out fixing small bugs or adding features. I don't have a particular project in mind. I'd like to work on C, C++, Python, .NET, Java, etc projects. However, my problem is I can't figure out how to find anything on Github.
I did find a... |
Possible Duplicate:
What does mathematics have to do with programming?
How often do you have to solve pure mathematical or algorithmical problems?
I heard that math can be very important in programming. I am a confident python programmer, and have started C++.
So far I have not encountered anything where I need to us... |
This is really perplexing me. We have a 'definition of done' and it includes dev 'done', unit tests 'done', dev test 'done'. However we also have a user acceptance test that needs to be 'done' but the business wants to know when users stories are complete so that they can see stuff (the uat really isnt a priority until... |
I'm new at computer science and programming, and I was wondering, is there a difference between computer science and programming? and do you get to choose to study only one of them at the university, or both of them?
|
I was looking through the AvSol Coding Guidelines for C# and I agree with nearly everything but I'm really curious to see what other think of one specific rule.
AV1500
Methods should not exceed 7 statements A method that requires more
than 7 statements is doing too much, or has too many responsibilities.
It also... |
<HTML>
<HEAD><TITLE>Login Page</TITLE></HEAD>
<BODY>
<CENTER>
<FORM method="POST" action="http://yourserver/cgi-bin/login.py">
<paragraph> Enter your login name: <input type="text" name="login">
<paragraph> Enter your password: <input type=password name="password">
<paragraph> <input type="submit" value="Connect">
</FO... |
I want to generate code documentation in a simple format. The key items are Method Signature, members, constructors, methods. I am taking various applications in .NET and creating documentation for them. I will be adding notes to each item. The end result should look similar to MSDN or Java API documentation.
So, I... |
In Java, which is more highly recommended, and why? Both types will throw exceptions, so in that regard handling them is the same. assert is slightly shorter, but I'm not sure how much that matters.
public void doStuff(Object obj) {
assert obj != null;
...
}
vs
public void doStuff(Object obj) {
if (obj == ... |
The Problem
I am hunting down a bug in a web application related to multi-uploads using a Flash movie/applet. Sometimes, the progress bar that is used in the Flash applet to indicate file upload progress will read over 100% for a progress and causes the entire upload system to halt.
Aside from the logic errors associat... |
I've been programming for a while, I've written some rudimentary programs, and I want to keep learning. I've reached that point where you just don't know what to learn next, and I'd like to ask a question for my own curiosity.
The question, in a nutshell, is if you can combine multiple programming languages into 1 resu... |
According to this Python code visualizer, Python strings are allocated on the stack and not on the heap.
Why is this? I thought they would be similar to Java where Strings are allocated on the heap.
|
In this Stack Overflow question:
https://stackoverflow.com/questions/9471332
I learned that Jscript is not dead after all. Yay!
But what is JScript.NET good for?
According to this article, you can use it to provide C# with an Eval function. That's neat, but it seems like kind of an edge case.
If you were after fir... |
According to this, "Scrum highly relies on a highly motivated, closely collaborating, cross-functional and self-organized teams." So how do you handle co-workers who may not be as motivated to take ownership of the code? How do you get someone interested in taking ownership?
|
A weird title, yes, but I've got a bit of ground to cover I think.
We have an organization account on github with private repositories. We want to use github's native issues/pull-requests features (pull requests are basically exactly what we want as far as code reviews and feature discussions). We found the tool hub ... |
This might be a little open ended, but I heard an explanation of this talk on how GP could be used to fix bugs, and I wonder: How does this differ from the infinite monkey theorem?
|
I have created several hand written compilers for very simple languages but now I want to try my hand at developing a dynamic language, similar to a simplified Python or Ruby. However, it was easy for me to wrap my head around how compilers work. Primitive compilers just translate. But I can't do this if the languag... |
java.util.Arrays.sort(/* int[], char[], short[], byte[], boolean[] */) is implemented as a 'tuned quicksort' rather than a radix sort.
I did a speed comparison a while ago, and with something like n>10000, radix sort was always faster. why?
|
Possible Duplicate:
Should newbies use IDE autocomplete (Intellisense)?
Since I moved on to actual IDEs for C++, Java and Python, I noticed they automatically try to complete my code. For example if I write System.out.pr[...] I am automatically offered a list from which I can select the item I want to use.
As a begi... |
Mocking the DAL/Repository that I pass to the BLL/ViewModels for testing purposes is not much different than creating an in-memory DAL. Right now I'm using an in-memory DAL in a new project instead of mocking it and it's working very well so far (even easier than setting up the mocks I'd say).
Since I haven't seen this... |
We have three applications developed in Flex and all these use BlazeDS. These applications have their own authentication implementations (Database). Also they will be deployed in tomcat. Deploying all these applications in the same tomcat instance is acceptable for us.
We want to bring the authentication credentials of... |
I am looking into designing a system where users build a template item and then create many instances based on this template.They then need to be able customise each instance but I also need for them to be able to make changes to the template and have all instances updated. These items are fairly complex, each consisti... |
We are currently deciding on a consistent naming convention across a site with multiple web applications. Historically, I've been an advocate of the 'lowercase all the letters!' when creating URLs:
http://example.com/mysystem/account/view/1551
However, within the last year or two, specifically since I began using ASP.... |
How much experience is considered enough for a developer to become a team leader?
For IT managment what is the measure to check if the current team member is good enough to become a team leader (technical level, interpersonal level)
updated: removed second part of the question for being duplicate (see comments)
|
Look here: a typical holy war on tabs vs spaces.
Now look here: elastic tabstops. All problems solved, and a bunch of very useful new behaviours added.
Are elastic tabstops even mentioned in that tabs vs spaces discussion? Why not? Are there drawbacks to the elastic tabstop idea so serious that nobody has ever implem... |
Currently at my job, we have a large suite of unit tests for our C++ application. However we don't use a unit test framework. They simply utilize a C macro that basically wraps an assert and a cout. Something like:
VERIFY(cond) if (!(cond)) {std::cout << "unit test failed at " << __FILE__ << "," << __LINE__; asserst(fa... |
I'm pretty new to JavaScript, but one of the things that's been frustrating is that our AJAX callbacks have been getting packed with different functionality, making it difficult to keep everything separated and organized.
I'm really new to programming, I have a feeling learning MVC a bit more would help me, but for no... |
And I don't mean Autocomplete or automatic code snippets as inserted by modern day editors, or polymorphic code. But what is the state-of-the-art in programs that can go through given inputs and types and information of the desired outputs and output a valid piece of code in a language of choice. I am aware of Genetic ... |
My team is going to add new team members and my manager doesn't want to take any risks. I don't think it's a large problem but my manager is concerned that a new programmer would sabotage and accidentally destroy parts of the code or the data e.g. cause data disaster. I say that probability is not very high but still I... |
In my years of programming Java and more recently Scala, I've never used Ant, Maven, Gradle or any of those build tools for Java. Everywhere I've worked there was a build manager who took care of all of that -- I'd compile locally with the IDE for development and unit testing, then check in the source code and notify ... |
Is there a term for performance issues caused by someone creates a loop that performs hundreds or thousands of actions that could have been done in bulk?
My example is that I keep running into loops that loop through a group of IDs and then perform a single query for each ID to retrieve the associated row instead of cr... |
I'm sure we've all been in the situation where we've inherited code that was "overly public", becomes obsolete or needs to be refactored. In these situations, it is easy to spend many days analysing the API surface to see where methods or classes are consumed; with the .Net runtime, it seems logical that it should be r... |
I love the immutable "pattern" because of its strengths, and in the past I have found it beneficial to design systems with immutable data types (some, most or even all). Often when I do so, I find myself writing fewer bugs and debugging is much easier.
However, my peers in general shy away from immutable. They are not ... |
For years, I have been doing Algorithmic stuff, writing scalable data structures for internet search, for example Randomized Binary Search Trees for Auto Recommendation, BitMaps, Wisdom of Crowd based Algorithms using Graphs, writing some interesting Machine Learning Algorithms like Clustering, Anomaly Detection, worki... |
I'm learning new languages as I go along, I write code for very basic programs in multiple languages, and I go to classes. I've read books, articles, lessons, videos, you name it, however I can't seem to get the hang of certain things.
For example I never understood pointers - what they are good at. (NOT PART OF THE QU... |
From my research, many obfuscation/optimization packages include a feature called pruning where the software will remove dead code during processing.
The following packages include both obfuscation and code pruning as a feature (to name a few):
RedGate SmartAssembly (.NET)
Preemtive Dotfuscator (.NET)
Inquartos Obfusc... |
I'm reading the Wikipedia page on first normal form, and am confused about the last bullet point:
5) All columns are regular [i.e. rows have no hidden components such as row IDs, object IDs, or hidden timestamps].
Does this mean "all information about a row is contained in its values" (my words)?
I understand the re... |
Is there a sane way / best practices way to swap out a DB from MySQL to SQL Server in a multiple large projects? Some of the projects are ASP projects, some of them are windows services, some are standalone windows apps. I don't think any ORM is used. I think its just SQL statements all over the place.
|
I am trying to find an approach for a project, where A user can edit records, and be able to see past versions of those records. Here is a simlified example schema, using a list:
TABLE list (
id int auto_increment primary key,
user_id int,
title varchar(255)
);
TABLE list_tasks (
id int auto_increment primary... |
I am going through Abelson and Sussman (Structure and Interpretation
of Computer Programs) and I am a little confused about when normal order evaluation is used and when applicative order evaluation is used.
This sentence throws me off:
Lisp uses applicative-order evaluation partly because of the additional efficiency... |
I'm a PHP developer with familiarity with Rails and a focus on MVC development. My company is moving more and more to SharePoint and I feel I need to learn to build application within the SharePoint system.
I have some brief introduction to C# but that's about it. I've used some SharePoint Designer and the web interfac... |
When writing tools for the CLI of UNIX, how should I make the program print out help and/or usage?
I usually use fprintf(stderr, "help text here");, but there are several issues with that.
First, I'm not sure, whether I should use stderr. Is that OK, or should I use stdout?
As you can imagine, the help text is quite l... |
What I will say might be a tad controversial in nature but I am very disheartened today - and so I will ask this.
I just had an interview with a major tech firm for an internship position, where I was asked a lot of typical algorithm oriented interview questions. Now, given my background, I consider myself to be strong... |
I'm just learning about using cgi in html files. I've read a lot of stuff on the web, but most of it is all about the trees and not enough about the forest. I'm a top-down learner and I'm having trouble understanding what's going on with cgi, apache, and html. At the moment I'm using python as my cgi scripting language... |
Even though developers have switched from junit 3.x to 4.x I still see the
following 99% of the time:
@Before
public void setUp(){/*some setup code*/}
@After
public void tearDown(){/*some clean up code*/}
Just to clarify my point... in Junit 4.x, when the runners are set up correctly, the framework will pick up the ... |
So I'm very close to releasing an app I've been working on, and the server I integrate with allows me to register users. So I was wondering if I should require users to register with the app before they use it. The app wouldn't "need" the registration for any of the features (although I have some ideas about future u... |
I have a few project ideas that I'd like to deploy on GAE. I'm interested in developing a logging application for amateur radio contacts, shortwave, and utility monitoring. More complex projects include satellite tracking, audio streaming from multiple radios, and radio remote control including transmitting and receivi... |
In JavaScript, PL/SQL and some other languages, functions can be nested, i.e. declared within another function. This could be used to break a large function into smaller pieces, but keep those pieces within the context of the larger function.
function doTooMuch() {
function doSomething () {
...
}
fun... |
AFAIK, my class extends parent classes and implements interfaces. But I run across a situation, where I can't use implements SomeInterface. It is the declaration of a generic types. For example:
public interface CallsForGrow {...}
public class GrowingArrayList <T implements CallsForGrow> // BAD, won't work!
... |
I'm selling software that lets users manipulate critical information.
In my licence contract (drafted by a lawyer specialized in this field), I've got a standard clause reading:
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRA... |
When switching to a functional style of programming after coming from procedural and OOP, what things do I need to know upfront about "this new way of thinking"?
How do you prepare yourself for diving in the FP world and get it first time around?
What are the basics to learn and set straight first?
|
We have a series of hardware and we have decided on a common API to be given to the customer for use. The customer will use this API in order to program the hardware.
The API includes functions for establishing a connection with the h/w like X_Open,X_Close,X_SetConfig, X_GetConfig, no of hardware connected, error handl... |
Why would there be any pressure if everyone knows what they are doing and the projects are accurately estimated? If there's pressure, or even high pressure, then it implies what they are currently doing is not working, why would any good programmer want to join a team like that? Are these kind of job posting failed at ... |
Many people recommend that we should code against interfaces and avoid statics for testability.
Interfaces are not just for testability, they are sometimes a requirement. But sometimes we introduce new interfaces in application only for testability.
If type mocking frameworks help us to isolate dependent types, then wh... |
I am switching from C#+Visual Studio to Ruby+Vim for a few months. The only thing that I am missing from C#/Visual Studio is intellisense, especially when I have a new ruby gem to familiarize.
As a programmer with a below-average memory like Joel, I miss the a happy time in Visual Studio that I can Ctrl+Space everywhe... |
I have a complex object (call it BusinessLogic) which provides an RPC interface to semi-trusted users. The functions in the RPC interface have to decide which procedure to call, check authorisation for that function, perform some argument checking, and then call private functions to carry out the required functionality... |
I have been researching into when data is being accessed or shared by multiple threads within Java. And looking into the problems such as:
Thread Interference
Memory Consistency
Deadlock
Starvation
From this, solutions to solve these problems.
So far all I seem find to fixing these problems is by using a synchronizi... |
I want to model a Thesaurus using the ANSI/NISO standard relation description like "broader term", "narrow term", etc. (see this Wikipedia article for details). Is it valid for a Thesaurus item in this description standard to have more than one "use" relationship?
|
We have a PHP intranet site that we run with warning/error logging on (as it's not under heavy load and there's a number of bugs/bad code left to find). Because the site is relatively unstable and in active development, I've been clearing the production error logs when each new version releases so I get a clean look at... |
I know we have questions about comments in general but I'm specifically wondering about Java Doc style method documentation here.
I've been pruning unnecessary comments as I refactor and I've noticed our code has painfully obvious descriptions of methods.
/**
* @name save
* @desc Validates and saves submitted daily pl... |
I know I can throw exception from constructor in PHP but should I do it? For example, if a parameter's value is not as I expected it.
Or should I defer throwing an exception till a method is invoked. What are advantages and disadvantages in both cases?
|
Recently I had a discussion with a developer who mentioned that during program development, they routinely create and delete tables and columns on a regular basis while working on new features and justified things by saying that this is normal when using an agile development process.
As most of my background is in a w... |
My program uses the following define statements:
#define LOWEST_PATIENT_ID 10000
#define HIGHEST_PATIENT_ID 99999
#define LOWEST_CRITICAL_STATUS 1
#define HIGHEST_CRITICAL_STATUS 100
used in this type of code:
do{
scanf("%d", &c_status);
}while((c_status<LOWEST_CRITICAL_STATUS)
||(c_status>HIGHEST_CRI... |
Simply, If I use reflection to add methods or functionality to a class defined in a LGPL'd library I'm linking to, does that count as a modification to the existing library and would my reflective code have to be released under the LGPL?
|
In my job all developers that resolve a bug have to add a new unit test that warns about this type of bugs (in the case it occours again). If a unit test is not possible (for example, a webpage design issue), then QA department has to create a test case to manually check it.
The idea behind this is that if a defect has... |
Recently a senior developer that I work with made a case for requiring that developers get the latest version and compile as part of their project a major internal library. This stands in contrast the the counter argument that project teams should be working off a stable version that they get from an internal Maven rep... |
I'm assuming there's a history to it, but why does the stack grow downward?
It seems to me like buffer overflows would be a lot harder to exploit if the stack grew upward...
|
Just need a bit of advice here, if we embed Adobe Reader as an activex control, as well as have a fallback PDF viewer (in case the user doesn't have Adobe Reader installed) would it be wiser to put screenshots in the manual using whatever the latest version of Adobe Reader is, or using the fallback reader?
I can see ... |
I just want to make sure I'm using the right license for my open source API wrapper project for some social networks and also make sure I understand it. Could you just describe the basics of that license? What I can and can't do, etc? Does these things suit the GPLv2 license:
Open Source'ness
Ability to use it in your... |
I am implementing RSA encryption on a Android App so that I can send SMS message securely, each phone will have its own public and private key generated by the App.
But am stuck deciding the best way to store the keys, my options are:
Create a keystore and hold the public and private key in the keystore.
Save the pu... |
I'm currently using decorators to apply various modifications to a template prior to rendering it.
I'm unsure about my cache decorator, though, because it is currently able to break the chain of decorators and return a cached object as opposed to the original decorated object.
class Cache : Decorator
{
public Strin... |
I'm in search of good language or metaphors to discuss the maintainability of code with non-technical folks (PMs, business sponsors &c).
In particular, I've recently created a few one-off, get-it-done-tonight, gets-the-job-done pieces of code. Everyone, including the internal sponsor, knew that we were saving a couple ... |
I want to know how difficult/useful it is to keep a project log or diary. I'm worried that keeping track of what I did will eat up too much time...
|
I was reading up on design patterns, and I read that the prototype design pattern does away with excessive subclassing.
Why is subclassing bad? What advantage would using a prototype bring about over subclassing?
|
I'm a 23-year-old novice game developer who just got his first job in the industry a year ago. Unlike most programmers I know, I started programming pretty late, during my second year in college, and I didn't work on any projects of my own until a couple of months ago. I feel like I'm doing quite well and picking thing... |
I'm trying to store a directory structure, including files and their content, in MongoDB. The work is part of a synching app, and is using in Node/Mongoose.
Now, I'm new to Mongo, and it's late here - is the idiomatic implementation as easy as it looks - ie, something like this?
var FileStoreSchema = new Schema({
fu... |
Recently I receive a request: users' emails are stored in the database, and as request of a user, the system will send an email on their behalves.
To add more context, it's like sending an email from the vendor, to their customers' email addresses. But it's not a fixed email (it depends on which vendor ask the system).... |
I am currently reading some material by Jeff Patton regarding Agile and UX.
http://www.agileproductdesign.com/presentations/index.html
I was interested to find out from the community what UX design and testing behaviors seemed MOST helpful to their scrum teams to create GREAT and delightful products.
hallway usability... |
This is more of a style question, but it is something I am currently pondering for a project of mine.
Assume that you're creating an application which is modeling a school. So there are entities like Student, School, etc. Now this is all fine and intuitive until you get down to Class, as (in most languages) Class is a ... |
What were some of the economic (and other historical) factors that led to object oriented programming languages becoming influential? I know that Simula started things off, but was the adoption of OOP languages due to the ever increasing needs of business? Or, was the adoption due more to the new things that could be d... |
I would like to understand why do some people like open source and some others like closed source? Let me be more specific and make my question about web development. If I build my site using an open source server side language what are the benefits for me? and if I build it using a closed source server side language, ... |
Is it worth testing the return type and value of a method call that is designed for chaining? It is conceivable that a fellow programmer could accidentally change the return type to void and remove the return while furiously refactoring some methods? This would potentially break a lot of code for an unsuspecting user. ... |
Rule 9 in Object Calisthenics by Jeff Bay (RTF) is:
Rule 9: No getters/setters/properties
The last sentence of the previous rule leads almost directly to this rule. If your objects are now encapsulating the appropriate set of instance variables but the design is still awkward, it is time to examine some more direct vi... |
I've been looking around for some articles regarding to requirements analysis, but I'm a bit confused with the term, because based on Wikipedia requirements analysis is a stage of requirements engineering.
But once you search more, many of the websites use them interchangeably as in they mean the same, can you please ... |
I have made a web application and now I would like to add a search option to it.
Since it is a learning project, I can't afford to buy some Google license. That is why I consider creating my own search engine.
From what I have read, there are two major ways to do it: using Apache Lucene or using Apache Solr. I have rea... |
What kind of skills determine a person that is capable of debugging code with ease? Some time ago my friend carried out an interview with a relatively good programmer. The programmer got hired. He could write good code, understood the frameworks and design patterns. The thing he was missing was - debugging skills. He c... |
I am trying to write some code to schedule a set of real life tasks that are input by the user. These tasks are stored in an SQLite database. And at the moment, the only parameters I am taking into consideration are the,
The project to which a task belongs to --> p
The name of the task itself --> t
And the due date fo... |
I had been tasked with managing a project which was outsourced to some Ukrainian developers.
The company hired them through Elance at a fixed price. At that point my boss left me alone to handle them and get the work done. I created a detailed specification of the complete thing that needed to be done.
The project invo... |
I'm desiging a distributed application that will consist of REST services and a variety of clients (Silverlight, iOS, Windows Phone 7, etc). I was ready to decide that I would implement my REST services using WCF Data Services (OData) but now the the MVC 4 Web API has made me question that decision.
What I liked about... |
A little background: I work at a relatively small (<10 developers) tech company which basically produces a single product, which is constantly evolving and being added to. The product is an off-the-shelf client/server product, where we run the server and the clients are mobile apps running on a variety of platforms (An... |
I'm starting to design a game that is going to have the following characteristics, and I'm trying to decide how I should program it. I'll also give a bit of my experience after, to help make the decision a bit better.
The game should be able to support both Facebook integration, and a stand alone version.
I don't want... |
On personal projects (or work), if one gets stuck on a problem, or waiting to figure out a solution to the problem, if you jump to another section of your code, don't you think it will be a good reason your application will be buggy or worse yet never get completed?
Assuming you are not using git and code each feature ... |
I currently have a php script set up to do some xml parsing. Sometimes the script is set as an on page include and other times it is accessed via an ajax call. The problem is the load time for this particular page is very long. I started to think that the php I had written to find what I need in the XML was written poo... |
To call yourself a competent Java programmer, what should you expect of yourself and what should others expect from you?
Does anyone have ideas for a project or problem that would help measure someones "java-smarts"?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.