instruction stringlengths 34 36.1k |
|---|
HTTP redirects are done via HTTP codes 301, and 302 (maybe other codes also) and a header field known as "Location" which has the address of the new place to go. However, browsers always send a "GET" request to that URL.
However, many times you need to redirect your user to another domain via POST (bank payments for e... |
I am looking for statistics concerning the distribution of programming languages in the embedded sector. Do you know any good websites, articles or books?
I found this as a first reference but am still looking for further information:
http://www.eetimes.com/electronics-blogs/industrial-control-designline-blog/4027479/R... |
We have to organize a very long list of manually running tests. Currently we use Word documents, print them out check them off etc. Ugh-ly but works, with problems.
Problems with the current solution
Requesting and executing subsets, depending on the actual changes. (i.e. tests 153, 155-157 and 24325 need to run only ... |
just because i think we are not using the full potential of all possibilites here yet:
What Pre/Post Commit Hooks (i.e. PHPUnit, PHPDoc) do you people use on your Team Git/SVN Servers?
By now we do use a minification script (sadly only removes unneccessary space and comments and merges files), PHPDoc, PHPUnit and that'... |
I'm writing unit tests for a steering system for a video game. The system has several behaviours (avoid this area because of reason A, avoid this area because of reason B, each adding a bit of context to a map of the region. A separate function then parses the map and produces a desired movement.
I'm having trouble dec... |
In a fairly complicated web application, there are almost hundreds of redirecting to another page, or linking to another page, etc. Imagine that you have a page called /services/users/register-new-user and in many places you want to redirect users to this page, or you want to provide links to this page. However, if for... |
Overheard at the watercooler yesterday: "Scrum has no place in defense contracting."
I tend to disagree in the sense that I believe Scrum can be tailored to work in many scenarios and I can see defense being one of them. This sparked a huge debate amongst my colleagues (many of us work in defense contracting) with a... |
Possible Duplicates:
MonoTouch vs Objective-C for iPhone/iPod/iPad development
As a C# developer, would you learn Java to develop for Android or use MonoDroid instead?
I'm very curious about the tools named MonoTouch and MonoDroid to create applications for Android, iPhone and iPod by using c# code.
Question:
Are th... |
For various reasons I need to supply "proof" my company's lawyer that I implemented a feature by a certain date. I have used source control since the late 90s and even the oldest databases are still working. I also have the all the old setups. Our release notes are not always as clear as they could be and most of them ... |
A week ago I asked the question; First big project, how to get started. Make menus, save to harddrive etc. I tried to do everything without doing a GUI with Swing but I realized that for every view I wanted to present to the user I had to make a new class. Right now I have 3 menu classes (the mainMenu, computerCategory... |
Since the beginning of the Javascript race -- which I would situate around Google Chrome launch in 2008 -- the improvement in the Javascript engine performances have been impressive.
The web is crowded with comparisons such as "Firefox V3.42.7 vs. Safari 3.0-prealpha2", and the winner of those comparisons changes every... |
In C and C++ (and I guess other languages that allow taking a "reference" to an array element or something similar), when you have an array like type, accessing individual elements of such an array can be done "directly" or via a temporary reference or pointer.
Example:
// Like this:
for(int i=0; i<n; ++i) {
theArra... |
Possible Duplicates:
Frankly, do you prefer Cowboy coding?
Prototyping vs. Clean Code at the early stages
Good design: How much hackyness is acceptable?
Does craftsmanship pay off?
Which is better:
Coding fast, not caring about possible errors and limits, maybe forgetting to check the input, NULL returns etc, just t... |
Wikipedia defines the termination point of a GA to this:
Commonly, the algorithm terminates when either a maximum number of
generations has been produced, or a satisfactory fitness level has
been reached for the population. If the algorithm has terminated due
to a maximum number of generations, a satisfactory so... |
I have been told its kind of a bad idea to use a key as an attribute of an xml tag. I find the very handy for ajax as i can just stick the key i need in what ever element is being clicked,changed, or whatever. I can see how this is a security risk but have only used the tactic in internal apps.
On external application/... |
I'm working on a internship project, but I have to leave before I can finish up everything.
I have 1 class that is not stable enough for production use. I want to mark/flag this class so that other people will not accidentally use it in production. I have already put the notice in Javadoc, but that doesn't seem enough.... |
I want to know your opinion. Do programmers (like me) need to know about design? For example drawing, web design, image manipulation etc.
Edited
Actually, I like web, enterprise and mobile programming.
Thanks :D
|
When you work across multiple programming languages, there is a problem you encounter...
A valid name (identifier) in one language is invalid in another. For example...
var new function this are a keywords in JavaScript, but you can use them freely in Python. Similarly list dict def can be used in JavaScript without pr... |
My boss is planning to use the metrics from our continuous build (builds and runs tests on every commit) as part of our performance reviews (in our 'quality' metric). This seems like a REALLY bad idea to me, but I'd like to know if anyone has studied this or seen this tried before.
My thought is that it's going to hav... |
I am studying operating systems and the x86 architecture, and while I was reading about segmentation and paging I naturally was curious how modern OSes handle memory management. From what I found Linux and most other operating systems essentially shun segmentation in favor of paging. A few of the reasons for this that ... |
I am implementing a model design where DB tables are 'resources', and a model can use many 'resources'. When I return a row from a table, it is represented by an 'item'. (This came from a book by Keith Pope, but I've seen it in several other places too).
So, my question is, who should be able to access the resources?... |
I am looking for advice on how to create my data schema for a public web site.
Currently, we have an Intranet website where our agents create the data needed for reservations. The data includes tables like Establishments, products, prices per periods, and a typical Users table.
This intranet is already in production.
I... |
I have a question which has been raised by my latest job (rather intern).
Just to put things into context - I'm 21 and I've finished my 2nd year of university before that I've had around 2 years of experience doing sys admin/QA jobs and basically I can say that I've seen how different IT sectors operated. Flash forwar... |
I'm currently working on a project that has both an open-source "community edition" and a set of closed-source features for paying clients. One of the pain-points right now is figuring out how to handle keeping the shared source in sync between projects.
We use Mercurial for source control, and the open-source piece is... |
I have a bunch of methods that are commonly used everywhere. Right now the codefile is named globals, to represent the fact that they are... in fact... global.
However, I do not like this.
I want to group these into a class and pass an interface around. I'll make only one instance, but I'm not falling into the singleto... |
Should organizations penalize developers for defect reports filed against their work products?
I was having a discussion with my friend where he asks if a manager taking the number of defects filed against a developer is justified. My take is no, because developers can introduce defects, but by holding those against hi... |
I have been studying Scala, but what I keep running into is the optimization of syntax. I'm sure that will be great when I am an expert, but until then.. Not so much.
Is there a command or a program that that would add back in all/most of the code that was optimized away? Then I would be able to read the examples, for... |
I've used several IDEs and created several default projects. Upon creation, I'll find folder structures created for me. Sometimes I'll see a Resources folder, sometimes an Assets folder, and sometimes both. Is there actually a (standard) difference?
|
I was just reviewing some code I wrote a while back, and can see that I have a couple of private methods that throw argumentnullexceptions and/or argumentexceptions if there are issues with the methods parameters.
I guess my rationale is that helps future proof the application if someone attempts to "misuse" the metho... |
I was wondering about how databases like MySQL and SQLite are developed to run as quickly and as well as they do.
I'm looking for answers to questions like:
How is SQL token-ized? Do you build an AST and compile/interpret like any other language?
How should one handle connections to the database? TCP? IPC? How do big-... |
Let's say I am implementing something simple like searching a sorted list/array. The function (in c#) would look similar to:
static int FindIndex(int[] sortedList, int i);
I could implement and test this in terms of functionality, but for obvious reasons I would usually prefer a binary search over a linear search or s... |
Is there a correct way to handle APIs that invent their own types?
For example, WinAPI, QT, Boost.
Many frameworks have their own integer and boolean types, along with more complicated data-types.
So, is it better to use native C/C++ type like bool or alternatives like QBool/BOOL/etc., and native container types like s... |
We are outsourcing a development to a small team of offshore developers. Our in house process for code review is manual, paper based, based on a waterfall model requiring "big bang" delivery. It cannot be changed. Past experience is these devs are proficient and reliable, however come time to deliver, the overhead of ... |
I'm developing a web-based source code editor. I'm developing everything(tabs, context menu etc) out of HTML elements. How do I come up with names for UI controls? Is there a book or guide or project from which I can learn how to name things?
|
I am trying to solve a mathematical problem in two different ways and output is a curve in both the cases. I want to compare these output curves for similarity in python. Is there any function or framework which provides this functionality?
Thanks.
|
I recently found out that programming late at night causes sleeping problems, so what are the best hours for 'after-job' programming? Maybe there is some time interval that should be set after finishing programming and going to bed, or some activity involved?
|
I'm currently looking into the advantages of using Backbone.js, but I'll be using ASP.Net MVC as the main bulk of the site. My question is, is it worth blending the 2 together or am I making a rod for my own back? Should I just use an ASP.Net Web Forms site instead?
|
I'm coming from a Java background and after I read this little essay by Paul Graham I started wondering about picking up a new language namely Common Lisp to speed up my work (I'm a web developer).
I'm writing pet projects currently but I have some business plans for the future. Paul speaks about LISP in his essay as a... |
As you know Google, Microsoft and jQuery.com offer JS files on their CDN. To do this, they must need to operate significant servers which must come at a cost to them. Why do they do this and what do they get from it?
|
I have mostly seen ASP.NET websites using MSSQL as database. Even I developed one some time ago. Why only MSSQL, when MySQL, a free alternative is available. So, the question is, IS it possible to integrate a MySQL database as easily as MSSQL with ASP.NET application or we need to use some API for doing so ??
|
How should I count the lines of code in a project?
In C++ for example, should I count the lines of the header files with my class definition? Should I count the header of a (non standard) library I am linking against?
In Qt (or any other GUI framework), should I count the lines of the form's design?
Should I count the ... |
We have an application which uses SQL Server as the back end. It was client server based, now it will be web based. Our implementation to logon was a user ID and password hash/salt stored in the database. Additionally, all policies and roles were stored in our table schema and assigned to users and or user defined ... |
Small companies with small budgets may not have have the money to invest in expensive software licenses that they may need for a given development project. This is even more so if the project was a loss-leader to drum up more business and the price of the development product cannot be renegotiated without potentially ... |
What are some good examples for illustrating the concepts of object-oriented programming? I'm talking about sample classes, classes that would have inheritance, overriding, etc.
The only one I can ever think of is of animals. A base Animal class, with Cow that have a different makeCry method or something like that. It ... |
Let's say I wanted to create a dynamic language compiler/interpreter, a Scheme interpreter perhaps, on the .NET platform as it exists today. Would I be better off using the Dynamic Language Runtime (DLR), or using C# 4.0 to implement my language's dynamic features? Or do I need both?
I know that there has been other w... |
I work at a place that has a clear separation between designers and developers. We're a fairly new start-up and we're trying to figure out what would be the best workflow for our team. We're a small company with a total of about 11 employees, three of which are designers (they deal with the HTML, CSS, some jQuery), a... |
We used a contractor to create the initial version of our site; they used their own MVC-pattern code-generator to create the (ASP.NET / C#) site and customized from there. That was turned over to us two years ago, and we've been working on it since. That's the environment I'm coming into, with little practical MVC expe... |
Lets say that we are testing FooClass with the following method:
public void Foo(string stringParameter, int intParameter, Action<Bar> successCallback, Action<Exception> errorCallback);
If the call to Foo succeeds, the successCallback will be called with the result of Foo in the form of a Bar object. If it fails, ... |
Yes, similar questions have been asked but always with the aim of finding out 'which one is better.'
I'm asking because I came up as a dev primarily in JavaScript and don't really have any extensive experience writing in statically typed languages.
In spite of this I definitely see value in learning C for handling dema... |
When it's more important to prevent typos than to cover 100% of all possible email addresses, what syntactic email validations do you do?
Imagine this:
You're with the local gas & electric company. 10% of new
installations are cancelled because the customer is not home and it
costs your company $50 a pop. You st... |
I am a newbie. I have decent command over C++ but i lack domain knowledge when it comes to servers and stuff. My current assignment is to write ISAPI filters for IIS Web Server. I have been googling for a couple of days and have found out that its quite a challenging task. I found some examples here. I need to understa... |
Possible Duplicate:
Should newbies use IDE autocomplete (Intellisense)?
I was having a conversation with another developer the other night about the pros and cons of Visual Studio. He was of the opinion that Intellisense reduces productivity. Of course I thought that was insane but I could be wrong. Is there any evi... |
I know there are similar questions on here, which I've read, but I recently read this post by Joel Spolsky:
How can I teach a bright person, with no programming experience, how to program?
And it got me thinking about my way of learning and whether it might actually be harmful in the long run.
I've dabbled with variou... |
I m thinking of using iTextSharp, which is licensed under Affero GPL, in an internal closed-source WinForms project. No one outside my company will be using it.
GPL (and Affero GPL as well) typically demands that the source be provided with the binary. Given that this is an internal project, do I need to provide my... |
Which is more efficient; which is faster? Trade-offs?
Goal is for fast look-ups in a web application.
UUIDs are the keys, so global will work.
Approx 50 million values.
A global cache is definitely more manageable than many smaller ones, even using JMX. But, I had a hunch that maybe the total overhead of the hashtabl... |
Another 2 days of reading and watching demos and here we go.
For my enterprise LoB Silverlight app I'm going to use:
Prism for UI aspects and modularity.
MVVM pattern (using Prism)
??? to bring data over and validations...
Entity Framework for Data access
SQL Server for data
Ok, main dilemma is #3. If I won't use any... |
I have a bunch of data from multiple retailers. Each product that each retailer sells may or may not be sold by another retailer in the database. If multiple retailers sell the same product, then the product can be identified by a SKU. I currently have 1 database for each retailer. I'm having a problem trying to concep... |
What are the most common mistakes and anti-patterns NHibernate user programmers make? Please explain why those are bad practices or give link to resource for further reading.
For example:
One anti-pattern common for new NHibernate programmers is to use identity/native POID's instead of ORM style onces. Read more here.... |
In our Delphi 2007 application we are using a lot of the following constructs
FdmBasic:=TdmBasicData(FindOwnerClass(AOwner,TdmBasicData));
The FindOwnerClass travels the Owner hierarchy of the current component upwards to find a specific class (in the example TdmBasicData). The resulting object is stored in the Field ... |
I have numerous personal projects I've begun and never seem to finish because I get sidetracked with other ideas. I was wondering what the best method to get personal projects done is? Any tricks or tips to it?
The problem is I get a spurt of inspiration on some projects, and I don't wanna lose track of my ideas and r... |
We have a team of .NET developers (C#) with a range of experience from 2 to 6 years. Over the last few years we have been developing Silverlight, ASP.NET MVC, and WPF applications. However, there is a new two year project which means we will develop a HTML5 application on Linux.
The company I work for would like all de... |
Is it correct to call a loop that you do not know the limit at compile time "non-trivial"?
If you know that you will be using a value from a class that will be in a range e.g. between 0-1000, is that still non-trivial?
e.g.
Where ISomeInterface.MAX_LIMIT is always between 1-1000:
public bool someMethod(Type someType, ... |
Other than vertices, edges, faces and meshes, my geometry processing project/application has only about half a dozen other entities such as curves on surfaces. However the majority of my code is dedicated to geometry processing. Being a naive programmer when I started this project, I implemented the various geometry pr... |
I have to create an Adapter between two software (mech. simulation, non-cs). Assuming we have a class named ThatThing. I have to handle various vendor specific implementations. These versions don't have meaningful names (unlike eclipse helios, indigo etc.).
1. How should I name a class that should express version numbe... |
Assuming:
The employee and company are parting on good terms
The new company is OK with a little contract work as long as it doesn't distract from the new job
The former company wants the help and the employee is willing to work a few hours a week
Is it a good idea to do contract work for a former full time employer?... |
In "enterprise" environments, I've observed a strong prejudice towards proprietary software. Even in large business that use Java, it is unusual to find MySQL or PostgreSQL, and WebSphere and WebLogic are strongly preferred over JBoss or Tomcat.
This is very understandable. While many developers prefer Tomcat or Postgr... |
I'd like to know if there's a general guide or best practice for wrapping basic functions.
Let's take J for example. It has several 1-or-2 character "functions" called primitives. Examples:
, : Flatten a matrix or append to a vector
{ : Catalogue combinations or take nth item of a matrix
{. : Take first or n elements ... |
Our developers demand that someone external to the development team completes the functional testing. Their argument is that they are biased and cannot test their own code as they are too close to it. Our last round of testing is with the client in the form of UAT.
To be clear by 'functional testing' I mean testing th... |
My javascript is getting out of hand for my PHP application. I have 20 tags that link to various javascript files in a javascript folder.
Each javascript file basically controls one element on the DOM. And, if the javascript file uses AJAX, then it will have a corresponding PHP file that the AJAX will call.
For exampl... |
Possible Duplicate:
How old is "too old"?
I'm about to start CS next year. I love both the coding and the mathematical aspects of programming. However, recently I encountered multiple rants about how it's impossible to actually be a programmer over 45, unless you're in a managing position or filling a very specific ... |
I found this code sample in this answer by Armen Tsirunyan.
class MyClass
{
public:
typedef void (*funcPtr)(int, int);
MyClass(funcPtr whatToCall)
{
callme = whatToCall;
}
void myClass::callMain()
{
callSomeApi(callme, <some arguments>); //callme function pointer is passed as argume... |
Possible Duplicate:
Making money with Open Source as a developer?
I've been hearing recently that more and more developers contribute their efforts to many open-source products. Being a novice in many aspects of software development I've never thought about myself as being a member of a team that builds a product al... |
Possible Duplicate:
When is a BIG Rewrite the answer?
In Joel Spolsky's famous (or infamous) article Thins You Should Never Do, Part I, he makes the case that doing a rewrite is always a wrong move because:
It automatically puts you behind (your competitors/schedule/etc.)
The code probably isn't as bad as the progr... |
I'm currently a student (Applied Information Technology) and we do most of our programming in C# and Java. I was wondering how can I as a developer, make money with open source. I know there is the story of give support, or provide services, but I'm not a sysadmin and I don't like sysadmin work. Actually I would love t... |
It seems that the primary usage of these terms is either:
mutual mystification of contractors and/or clients who don't know what they are talking about or how to talk about it,
the innocent and ignorant (see this question) , or
laziness to avoid having to say user-interface/user-facing or business logic/database/infra... |
I am working on a large MVVM application. I am using the MVVM light toolkit for this. The application is like a web browser with back and forward buttons. The main view is an user control. I laid the back and forward buttons in the main view user control. The main view in turn has user controls. The user controls chang... |
I'm a student, and I do a lot of code on a small (12.5", 1366x768) laptop screen that I carry from class to class. Most programming environments are designed with the idea that someone has large screen size available, because most programmers do in fact have access to large screens. However, large screens are difficult... |
What are some flaws that drive you nuts in C APIs (including standard libraries, third party libraries, and headers inside of a project) ? The goal is to identify API design pitfalls in C, so people writing new C libraries can learn from mistakes of the past.
Explain why the flaw is bad (preferably with an example), a... |
"... You need to understand the core language: is it algorithmic, functional, object-oriented? ..." - Effective Java, Joshua Bloch, 2ndEd. 2008. Foreword, p xiii
Functional: Lisp, OO: Java, but what is ( would Bloch mean by ) an algorithmic programming language?
|
I need to make an application for my dad to keep track of stock trading inventory. He trades shares for himself and for his clients and would like to keep the records, things like buy/sell price of shares, profits, loss, date etc etc for his shares and his client shares and would like various kind of reports/views.
He... |
I'd like to start Domain-Driven-Design, but there are several problems I'd like to solve before starting :)
Let's imagine I have a Groups and Users and when user wants to join a group, I'm calling groupsService.AddUserToGroup(group, user) method. In DDD I should do group.JoinUser(user), which looks pretty good.
The pro... |
If you do, do you discuss coverage, continuous integration, quality control, or anything related to the difference between unit testing, functional testing and TDD in general? If clients ask, do you simply state that you will unit test, but leave out specifics?
|
I'm not talking about working overtime for a project, but R&D, or test bed applications that benefit the company. These would become teaching tools, and eventually sales tools. I know it sounds crazy to even ask, but I'm seeing a trend in this industry with regard to rapidly changing technology, and a problem with gett... |
I've done a very small project for a specified amount of payment. The project was some client-side validation code. However, now client asks for code improvement (general code improvement including server-side, not mine which was purely jQuery and client-side) and says that these requirements are obvious duties of deve... |
I don't have any serious experience in SQL and I even hate to write SQL instead of LINQ. I am happy enough with ORMs.
From the employers and sector view point, is it important to know SQL? Do I have to master on it? Are companies that prefer pure SQL over ORM frameworks a "dinosaur" in the programming world?
|
I am thinking of developing customized software for desktops in Visual FoxPro 9 and want to know what type of licensing is required.
As a developer, would I need to have a Visual FoxPro 9 license and would my users need to have the End User License? What type of licenses would be needed for commercial release? How woul... |
I am working on a java project. I am new to unit testing. What is the best way to unit test private methods in java classes?
|
I just started learning the ASP.NET MVC framework and it's very different in architecture from regular ASP.NET development. Transitioning from windows forms to WPF was nice, and seemed a way forward in technology. But, while learning ASP.NET MVC, I don't feel the same, I am unable to convince myself that MVC is better ... |
The former page "Trademark and Logo Usage Requirements" at http://www.sun.com/policies/trademarks/ is no longer available, is there a new version which helps with the proper naming of products (beans, libraries) for Java?
I have found Third Party Usage Guidelines for Oracle Trademarks at http://www.oracle.com/us/legal/... |
I have a following problem i want to solve efficiently :
Input: Set s of {Pass,Fail}^k vectors, m - minimum percent of vectors
Output : Set of Sets of indexes: Where each set Contains indexes of Pass word in given vectors, and number of vectors that contains Pass in those indexes is over m percent from total vectors.
E... |
Java omits multiple inheritance on the grounds that it obviates the design goal of keeping the language simple.
I wonder if Java (with its eco-system) is really "simple". Python is not complex and has multiple inheritance. So without being too subjective, my question is...
What are the typical problem patterns that ben... |
What aspects of ASP.NET MVC can be considered bad practices of Microsoft or problematic? In ASP.NET web forms, thing like ViewState, Automatically generated Id and names, single form usage and pattern like this are many times problematic. As no claim should be reason-less, so, it's better to mention why that aspect is ... |
In almost any security system I've ever seen, what is controlled is that which person has access to which part.
However, in real life, in many situations, security systems also consider when and where a person is permitted to do something.
For example, you can drive fast in day, but you can't drive fast in night, or y... |
Note: this is a reposting as the question has been considered non-suitable for the Stack Overflow forum and should have been posted here. The original topic is there.
I'd like to talk of multithreading, parallelism and the libraries available today to achieve that work. I'm especially wondering whether an easy-to-use l... |
I have a code base that is designed around shared memory. Each process that needs to access the memory maps it into its own address space. The data structures in the shared memory are directly accessed, that is, there is no API. For example:
Assume the following:
typedef struct {
int x;
int y;
struct {
int... |
As I understand in theory under "unit" people mean method (in OOP). But in practice tests which verify some method in isolation are very fragile behaviour tests (verifying not the result but the fact that some dependency method was called). So I see a lot of people who by unit understand a small set of closely related ... |
So I have been looking through some code I wrote a few years ago for an economic simulation program. Each simulation has a large number of settings that can be saved to a file and later loaded back into the program to re-run the same/similar simulation. Some of the settings are optional or depend on what is being simul... |
Here's some background:
I have someone who is motivated to help me out on a project that already has a good chunk of code written
The person does not have a CS background, but knows the basics (functions, variables, objects, classes, etc)
The goal isn't to make this person a rockstar developer overnight - they just ne... |
On code reviews at work I have been seeing code & patterns that I consider "clever" though not necessarily adding to the overall quality or maintainability of the code base. I point this out on my feedback and am unconvinced by the counterarguments. I am a bit concerned when this code makes into into the repo and later... |
According to Martin Fowler, code refactoring is (emphasis mine):
Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.