instruction stringlengths 34 19.9k |
|---|
I have an application that, among other things, imports documents, then emails necessary parties to let them know that a document has been imported.
It turns out that determining whom to email, then performing the emailing, is what's taking the longest. I was thinking of doing something like this:
var document = Impor... |
My project is currently suffering from environment naming issues. Different people have different assumptions as to what environments should be named or what the names designate, and it's causing confusion when discussing them. I've done a bit of research and I haven't found any standards out there.
The terms include ... |
I am not sure if this is the best subsite to ask this question, but I'm pretty sure it doesn't fit on the normal or facebook SO page...
I've been asked to make a general API for connecting to several Social Media platforms (at the moment Facebook and Twitter).
I have already realised both of them seperately. Meaning I... |
I'm about to create a do-everything dashboard for my team and am still having second thoughts about my project/solution structure. Since this could be a long ongoing project, I want to get the structure right from the beginning.
This is what I had in mind:
Create a solution named "doEverythingDashboard"
Delete the... |
I work as a business analyst and I currently oversee much of the development efforts of an internal project. I'm responsible for the requirements, specs, and overall testing. I work closely with the developers (onshore and offshore).
The offshore team produces all of the reports. Version 1.0 had a 9 month developmen... |
I'd prefer to have sprints that last 3-4 weeks, but customers don't want to adopt new feature/function every 3-4 weeks. Existing customers are conservative and, once we meet their minimum bar for features and capabilities, they like to remain on a
stable release for much longer than 4 weeks. Even a 3-month cycle wou... |
I have started lately discovering Content Management Systems, and I was wondering, who is really CMS for?
What I mean by that: is it only for companies, small businesses or individuals, that pays a contractor to make a website that it's users can just upload content through a easy interface.
Or is it used also by pro... |
I am in an enterprise environment where we have applications that need to run against multiple Oracle databases. Developers may need to manage multiple vintages of these databases to support different test data or diagnose bugs against different versions of the code.
Right now, we have a limited set of test environmen... |
I think the two main problems with my programs are my code structure/organization and my error handling. I'm reading Code Complete 2, but I need something to read for working with potential problems.
For example, on a website, if something can only happen if the user tampers with data via javascript, do you write for t... |
Recently, I had to create a program to send messages between two winforms executable. I used a tool with simple built-in functionalities to prevent having to figure out all the ins and outs of this vast quantity of protocols that exist.
But now, I'm ready to learn more about the internals difference between each of the... |
I have the following :
public class doCheck(){
public void performCheck(){
try {
perform all checks......
}
catch(Exception e){
logger.error("Exception occured in class doCheck in method performCheck");
thrown new MyNewException(e.getMessage());
... |
I have been using Castle Monorail for some years now with great success, although I haven't bothered to update the version I'm using (2 or 3 year old). Now I'm making a decision on go to ASP.Net MVC 3 or update to the latest Castle version.
I have been looking documentation on the newest version of Castle projects (spe... |
Yesterday I had received a great job opportunity.
In requirements section I had seen the words:
solid knowledge of python;
solid knowledge of java;
good technical background;
Could you give me an answer, what does it mean?
How to test my current knowledge? What type of measure will be actually accepted by employer?
|
When writing unit tests, is it worth spending the extra time to make the code have good quality and readability?
When writing tests I often break the Law of Demeter, for faster writing and to avoid using so many variables. Technically, unit tests are not reused directly - they are strictly bound to the code so I do not... |
Based on what's considered idiomatic in C++11:
should an iterator into a custom container survive the container itself being destroyed?
should it be possible to detect when an iterator becomes invalidated?
are the above conditional on "debug builds" in practice?
Details: I've recently been brushing up on my C++ and l... |
I have been working on PHP and MySQL based web application for more than 5 years now. I started my career as an Intern, and worked my way up through Jr Developer and Software Developer to Sr. Software Engineer (Team Lead), and that's what I am nowadays.
I was looking at the link at Wikipedia regarding who is a lead pro... |
I have a custom made Framework (written in PHP). It all works very good, but i have some doubts about a certain thing.
Right now when a user call this url for example:
http://host.com/user/edit/12
Which would resolve to:
user = userController
edit = editAction() in userController
12 = treated as a param
But suppose ... |
I am developing a free, open-source (duh) JavaScript library, and wondering how to license it.
I was considering the GNU GPL, but I heard that I must distribute the license with the software, and I'm not sure anymore.
I would like the library to be available much like jQuery: In a free, downloadable script, preferably ... |
We're using Scrum and occasionally find that we can't quite finish a User Story in the sprint in which it was planned. In true Scrum style, we ship the software anyway and consider including the User Story in the next sprint during the next Sprint Planning session. Given that the User Story we are carrying over is part... |
I'm trying to compare two graphs using hash value ( i.e, at the time of comparison, try to avoid traversing the graph )
Is there a way to make a function such that the hash values compared can also lead to determining at which height the graphs differ?
The comparisons between two graphs are to be made by comparing chi... |
I'm designing a scene graph system, where it is required to compare two trees. The trees are populated with individual objects, each with varied number of children; and they have a root.
Eg: Parent: Scene, Children: Bullet1, Bullet 2, Player
What is a good way to compare two such tree? I'm using C++ for the code.
Als... |
I am a new developer, who just got hired at a big company. I don't know how but I guess they are desperate. However, I am well-versed with HTML5/CSS3 though things change and new things are released and I keep up with as much as I can. But this job required me to hand-code Javascript, know Jquery and Ajax. I have b... |
I need to try the following thing: I would like to compile some simple C code samples and see the assembly listing generated by GCC for IA64 architecture, i.e. I just want to run GCC with the -S switch and see the resultant .s file. I don't have an Itanium machine, so in order to do it myself I'll probably need a cross... |
Possible Duplicate:
Should I use switch statements or long if…else chains?
I'm working on a small program that will conduct an Insertion Sort. A number will be inputted through the keyboard and stored in a variable I called "num." I've decided to use a switch statement in order to obtain the number inputted.
switch(... |
Assuming no experience with version control systems, just local to live web development. I've been dropped in on a few legacy website projects, and want an easier and more robust way to be able to quickly push and revert changes en masse. I'm currently the only developer on these projects, but more may be added in the ... |
I have to handle data from long term (years, decades) climate monitoring stations. The data flow usually starts with raw data (voltages, etc.) plus quality check information (pressure, temperature, flow rate, etc.) generally recorded @ 1Hz. Then, the data are assigned a quality flag (human and/or program), processed (a... |
I am trying to come up with a list / ranking system on determining which server language to choose for a particular website. Assume that familiarity with a certain language is not important and the implementation can be done in any language. Here are some things that might be important but I am not sure how to rank... |
I am planing to build a website which one of its main features is the usage of pictures. I was wondering what existing techniques are used to prevent offensive pictures (i.e pornography) to get loaded by users. i.e What does Facebook or Pinterest use?
As well I would like to know what your recommendations would be to c... |
Many browsers now disable Java applets by default, requiring them to be enabled on a per-page basis. It seems like applets have not changed much in the past few years. In fact, it seems that client-side Java (applets, desktop applications, ...) is dying completely, and Java is primarily becoming a server-side language.... |
I started coding almost a year ago. By "coding" I mean HTML(5), CSS(3), and only few times I implemented some AJAX and JavaScript. I am interviewing for a position that expects me to know HTML, CSS, JS, JQuery, and AJAX. I feel confident in HTML5/CSS3 subject area and somewhat ok with javascript.
Will agency expect ... |
In order to measure Code Coverage for JavaScript unit tests, one needs to instrument the code, run the tests and then perform post-processing.
My concern is that, as a result, you are unit testing code that will never be run in production. Since JavaScript isn't compiled, what you test should be precisely what you exec... |
I'm writing my first programming language that is object orientated and so far so good with create a single 'class'. But, let's say I want to have to classes, say ClassA and ClassB. Provided these two have nothing to do with each other then all is good. However, say ClassA creates a ClassB--this poses 2 related questi... |
I am going to make a compiler for C and looking up on how compilers work on Wikipedia has told me a lot. However, after reading up on lexers has confused me. The Wikipedia page states that:
the GNU Compiler Collection (gcc) uses hand-written lexers
I have tried googling what a hand written lexer and have come up with... |
Today I encountered this little PHP gem called variable variables.
$literal = "Hello";
$vv = "literal";
echo $$vv; // => prints "Hello"
Are there actually any real use-cases for this language feature?
|
I work 40 hours as a programmer, and by the time I get home, the last thing I want to do is code some more. However, I feel like I am not getting better, and I do love software engineering. So how do you guys find the time/motivation to improve your craft outside of work?
|
If I use an existing open source project that is hosted for example on github within one of my projects, should I check in the code from the other project into my public repo or not? I have mixed feelings about this, #1 I want to give proper credit and attribution to the original developer, and if appropriate I will co... |
I realize that this may spur a religious discussion, but I discussed this with friends and get great, but conflicting answers and the actual documentation is of little help.
What does the 500 series response codes mean from the webserver? Internal Server Error, but that is vague. My assumption is that it means that som... |
I really love the idea of domain driven design, however, as I'm learning Go, I'm wondering if there's the equivalent of DDD that's aimed at an effectively more functional language?
|
Is there a convention for writing Python when deprived of newlines and whitespace? For example, stackexchange comments, Twitter, text messages...
|
Inspired by the numerous posts about the importance of learning Lisp/Scheme I started to learn Scheme two days back, I am using the book "The little Schemer" and have completed half of it.
But I still haven't learned anything new, the book teaches about recursion which I already understand and uses lambda (which I can ... |
I cannot count the number of times I read statements in the vein of 'unit tests are a very important source of documentation of the code under test'. I do not deny they are true.
But personally I haven't found myself using them as documentation, ever. For the typical frameworks I use, the method declarations document t... |
This question got me thinking what products of the programming effort belong to the employer, and what don't.
The two extremes are (0) the code - it apparently belongs to the employer and (1) the learned personal and technical skills. But what is in between? Who owns the pseudocode/algorithm? Who owns the general idea... |
I have been supporting a LOB winforms application for a client the last 3 years. The application is built with a simple monolithic architecture and uses .NET 2.0.
The application is a core part of their operations and its longevity is paramount. It needs to evolve with their evolving business processes, as well as impl... |
I work on several areas related to information visualization, linked data, computer vision and other stuff, so mainly front-end. I am not really happy with the fact that visualizations take lots of iterations and lots of time from first prototype to production ready code. So here is the question: what can I do to impro... |
I was attempting to find a best practice for modeling the tiers in a Java EE application yesterday and couldn't come up with anything current. In the past, say java 1.4, it was four tiers:
Presentation Tier
Web Tier
Business Logic Tier
DAL (Data Access Layer ) which I always considered a tier and not a layer.
After ... |
I am attending a Computer graphics course after the summer. I have read lots of good things about the book "Computer Graphics: Principles and Practice in C" for people who are willing to put in some work. My school does not focus on C/C++ until next year, so I have decided to learn Python this summer and get good at Py... |
We've developed a Web Application using ASP.NET and Sql Server. We've started selling it and of course are still continue improving and developing it.
How do we go about updating each client's version of the site? We have, maybe, 50 customers. So 50 different folders and 50 different db's sounds like a bad idea. Is the... |
Many larger OSS projects maintain IRC channels to discuss their usage or development. When I get stuck on using a project, having tried and failed to find information on the web, one of the ways I try to figure out what to do is to go into the IRC channel and ask.
But my questions are invariably completely ignored by t... |
Code formatting matters. Even indentation matters. And consistency is more important than minor improvements. But projects usually don't have a clear, complete, verifiable and enforced style guide from day 1, and major improvements may arrive any day. Maybe you find that
SELECT id, name, address
FROM persons JOIN addre... |
I'm going through some training on objective-c. The trainer suggests setting single character parameter names. The .NET developer in me is crying. Is this truly the convention? Why?
For example,
@interface Square : NSObject
{
int size;
}
-(void)setSize: (int)s;
I've seen developers using underscores int _size t... |
I just took a programming competition question and I absolutely bombed it. I had trouble right at the beginning itself from reading the input set. The question was basically a variant of this puzzle http://codercharts.com/puzzle/evacuation-plan but also had an hour component in the first line(say 3 hours after start of... |
When it comes to performance:
What is the better way to validate the user input?
If you think about a phone number and you only want numbers in the database, but it could begin with a 0, so you will use varchar:
Is it better to check it via the entity model like this:
@Size(min = 10, max = 12)
@Digits(fraction = 0, i... |
If we don't have the free and the paid apps on the Apple app store yet, how would we program in the free version to link to the paid version because the link is not there yet?
Do we have to have a webpage as a placeholder to do the forward, for this first, initial case? Is this the only solution and what if we don'... |
I am in the middle of refactoring code and would like to get some ideas on variable naming so that my new names clearly represent the data they hold.
I have a class called ContactMethod which makes sense to me; each instance is a different way to contact someone. My problem comes when naming the properties of ContactM... |
I'm a student working with various techniques of programming, and I've come across pseudocode and flowchart. I know that these are both used in order to think through the problem before actually programming, but I have a few questions with this.
When would I use pseudocode to plan out and when would I use flowcharts? ... |
Our business analysts pushed hard to collect data through a spreadsheet. I am the programmer responsible for importing that data. Usually when they push hard for something like this, I never know how well it will work out until a few weeks later when I have time assigned to work on the task of programming the import ... |
I'm buying a new laptop that I'll be using mainly for programming. A couple of options that really intrigue me are the Asus Zenbook UX31A and the new Retina Macbook Pro. It's obvious that the high-resolution displays on these laptops is useful for entertainment, photo-editing, and other things. My question is this: ... |
The Single Responsibility Principle is based on the high cohesion principle. The difference between the two is that a highly cohesive classes features a set of responsibilities that are strongly related, while classes adhering to SRP have just one responsibility.
But how do we determine whether a particular class feat... |
In one of the latest "WTF" moves, my boss decided that adding a "Person To Blame" field to our bug tracking template will increase accountability (although we already have a way of tying bugs to features/stories). My arguments that this will decrease morale, increase finger-pointing and would not account for missing/mi... |
I am making a pretty standard PHP sign up form that will validate the data the user entered and then redirect to a page with a success message. I would like to store this data in a database. Should I insert this information into the database before I redirect the page or after it is redirected?
|
Is it a good idea to create an OS that's written in a scripting language?
For example, how about creating an OS using Python?
|
I have just fulfilled (is that a good term?) two user stories out of a new project backlog I have just built. These are user registration and password reset, both requiring mail. I need to implement a substitute mail component because my initial choice, and a normally reliable one, wasn't working. Because I was focused... |
My question is hopefully simple - should I copyright my work (art, software, web design, etc.) under my real name or my screen name? My real name and screen name are also easily connected with a bit of searching, so does it really matter in the end?
I'm not a professional (at this point).
I read this question and they ... |
I'm wondering if I should bother providing a fallback for HTML5 tags and attributes and CSS3 styling at this point in time.
I know that there's probably still a lot of people out there who use older versions of browsers and HTML5/CSS3 are still fairly new.
I read this article: Should I use non-standard tags in a HTML p... |
When setting up a database I want to use the most efficient data type for potentially fairly long data. Currently my project is to store song titles and thoughts pertaining to that song. Some titles might be 5 characters or longer than 100 characters and the thoughts could run pretty long.
Is it more efficient to use a... |
I'm facing problem with generating character sequence for SMS tracking. there should be a easy to enter code send with all the outgoing messages. Reply SMS will map with that code.
I can't generate next sequence of code from database because multiple clients may have read at ones and may end up with same code.
is the... |
I am working on a UI code where I have an Action class, something like this -
public class MyAction extends Action {
public MyAction() {
setText("My Action Text");
setToolTip("My Action Tool tip");
setImage("Some Image");
}
}
When this Action class was created, it was pretty much assume... |
I know this sounds a lot like other questions which have already being asked, but it is actually slightly different. It seems to be generally considered that programmers are not good at performing the role of testing an application. For example:
Joel on Software - Top Five (Wrong) Reasons You Don't Have Testers (empha... |
Let explain what I'm trying to create. I'm creating a framework, the idea is to provide base classes to generate a math problem.
Why do I need this framework? Because at first time, I realized when I create a new math problem I always do the same steps.
Configuration settings such range numbers. For example if I'm dev... |
We're building a Django-based project with a template/generator component. This component will be separate from the project as such and can be Django/Python, Node, Java or whatever works. The idea is to generate questions based on a pattern. For eg., I would want to generate questions like "What is 2 + 3", "What is 5 +... |
I am in the planning stage of a project and I am looking to hire a project manager. I would like to do some coding and keep eye on all parts of the project. However, i have a feeling that a project manager will get better results. I have the following options:
1) manage the project and not code
2) hire a project manage... |
Considering the PCWorld review that came out in March:
Free Android Apps Packed with Ads are Major Battery Drains
...Researchers from Purdue University in collaboration with Microsoft claim that third-party advertising in free smartphone apps can be responsible for as much as 65 percent to 75 percent of an app's energ... |
Stack based virtual machines like CLR and JVM has different set of instructions. Is there any theory behind devising the instruction set while creating a virtual machine? e.g. there are JVM instruction sets to load constants from 0-5 onto the stack
iconst_0
iconst_1
iconst_2
iconst_3
iconst_4
iconst_5
whereas in CLR t... |
While working on existing code base, I usually come across procedures that contain Abusive use of IF and Switch statements. The procedures consist of overwhelming code, which I think require re-factoring badly. The situation gets worse when I identify that some of these are recursive as well.
But this is always a matte... |
Why is HTML/Javascript minification beneficial when the HTTP protocol already supports gzip data compression?
I realize that Javascript/HTML minification has the potential to significantly reduce the size of Javascript/HTML files by removing unnecessary whitespace, and perhaps renaming variables to a few letters each... |
We currently have a C++ socket server used by a java client. All of the socket code in both C++ and java is stick-built at a low-level with messages passed via JSON strings.
Are there cots packages or better techniques commonly used in this situation to reduce the cost of future development and maintenance?
|
For classes and functions, it is clear cut: each should do only one thing.
For libraries though, this is less clear. If you have a library with collections, it might have multiple collections. It might have useful functions like sorting, which aren't strictly collection based but users would expect. Each of these resu... |
In my few years of programming, I've toyed with everything from Ruby to C++. I've done everything from just learning basic syntax (Ruby) to completing several major (for me) projects that stretched my abilities with the language. Given this variety (and the fact that truly learning a language never stops), when can I... |
How many directed graph nodes are typically represented in the browser? I'm working with some large data-sets with nodes and edges more then 400,000. I'm wondering if I am going down a fruitless path trying to represent them in the browser via arbor.js or similar JS libraries. What's the most effective way to allow a l... |
I just want to find out the best practice to deploy your MVC3 application and what tool you use to get the job done.
I am using Visual Studio 2010. I publish my web site, then manually backup whats on the production server, then upload the new one there. It's tedious and error prone.
What should I do to make this job ... |
There has been a flurry of activity on the internet discussing a huge difference between the productivity of the best programmers versus the productivity of the worst. Here's a typical Google result when researching this topic: http://www.devtopics.com/programmer-productivity-the-tenfinity-factor/
I've been wondering ... |
I went for an interview yesterday where I was asked this question:
"How does having assets (images/videos) stored on a secondary domain (assets.example.com) reduce the load time of example.com?"
To that I answered that by having the code "call" those assets from a secondary website it reduces the traffic that is comi... |
I need to make a few images for an arcade video game I'm making in Java. As of right now, I have drawings that animate, but there are two problems.
The drawings are horrible, and as a result, the game won't get enough attention.
It's a pain to have to change each coordinate for the drawing, as the drawings are fairly ... |
I am working on a kernel-related project (specifically related to the TCP/IP stack of the kernel).
I need to build some models to describe the functionality and components of my system.
Initially I thought about using a Class Diagram, as it can describe the general architecture of my system. But it doesn't make sense s... |
While talking with one of my coworkers, he was talking about the issues the language we used had with encryption/decryption and said that a developer should always salt their own hashes. Another example I can think of is the mysql_real_escape_string in PHP that programmers use to sanitize input data. I've heard many ti... |
I just started using requirejs and I love it. I have one concern though. I've been compressing all my js files into one single file. Even with requirejs optimizer, I need to load module files from the server time to time and I'm concerned with it.
Performance and user experience wise, which one is better?
|
I'm looking for the best solution to write cross-platform software, aka code that I write and that I have to interface with different libraries and platforms each time.
What I consider the easiest part, correct me if I'm wrong, is the definition of new types, all I have to do is to write an hpp file with a list of type... |
If you are familiar with the Java RDF and OWL engine Jena, then you have run across their philosophy that everything should be specified as an interface when possible. This means that a Resource, Statement, RDFNode, Property, and even the RDF Model, etc., are, contrary to what you might first think, Interfaces instead... |
I have this big book that basically covers all the main aspects of the C++, the problem is that is pretty old according to the C++ standards of today, it's ok to use it?
|
I often find myself breaking this principle (not intentially, just through bad design). However recently I've seen a bit of code that I'm not sure of the best approach.
I have a number of classes. For simplicity I've taken out the bulk of the classes methods etc
public class Paddock
{
public SoilType Soil { get;... |
Basically in both cases you have:
a well defined vocabulary
a syntax to respect
they both can express a business logic
they can define semantics
I don't think that will be fair to say "A programming language is only useful for a PC" or something like that.
I just can't find a real answer, but we can feel the differen... |
In Entity-Framework, you can create a DB schema, and then generate your ORM classes. Is there any software that does this in reverse? For example you create a few classes that have relationships, and software generates a database schema with the relevant primary and foreign key relationships?
|
Specifically, I want to support "plugins" that modify the behavior of parts of the library.
I couldn't find much information on the web about this subject. But here are my ideas for how a library could be extensible.
The library exports an object with both public and "protected" functions. A plugin can replace any of ... |
I really hesitate to ask this, because I don't want to "solicit debate, arguments, polling, or extended discussion" but I'm new to C and want to gain more insight into common patterns used in the language.
I recently heard some distaste for the goto command, but I've also recently found a decent use-case for it.
Code ... |
I work in a small shop at a fairly big company doing intranet web applications. By small, I mean there is 1 other guy in my position... and he graduated with me last December. (we aren't the only IT, but the only ones in our field)
We are switching out an old COBOL system and converting it's only used application suite... |
I am writing a simple ASP.NET Web Forms application. I want to improve the code by implementing any design pattern with which abstraction is achieved and increases manageability and understandability.
Which pattern is recommended? Please also provide links to sample applications.
|
I started working in a department that uses a CMS in which the entire "filesystem" is like this:
create a named file or folder - this file is given a unique node (ex. 2345) as well as a default "filename" (ex. /WelcomeToOurProductsPage) and apply a template
assign one or more aliases to the file for a URL redirect (ex... |
I'm developing a program that has a SQL database as a backing store. As a very broad description, the program itself allows a user to generate records in any number of user-defined tables and make connections between them. As for specs:
Any record generated must be able to be connected to any other record in any o... |
I mean is there some open sourced projects that were started as closed source and were commercially successful also? I am also interested in any story behind open sourcing them.
|
I realize that, for a programmer coming from the Java world, Groovy contains a lot of new ideas and cool tricks.
My situation is different, as I am learning Groovy coming from a dynamic background, mainly Python and Javascript. When learning a new language, I find that it helps me if I know beforehand which features ar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.