instruction stringlengths 34 19.9k |
|---|
Even though the name is similar my question is not a dupe of the very fine question here:
Database in the cloud?
I've got a webserver (Java/Tomcat) running a webapp (which I wrote) on a dedicated server (which I fully configured myself) and I'd like to have it now use a small persistent DB.
I know how to install and co... |
A lot of people smarter than me keep writing about when you learn Lisp it makes you a better programmer because you "get it".
Maybe all I hear about Lisp(s) changing your life is just a big practical joke on the newbies, but I figure there's no harm in knowing more about the world, even if I find out I've been sent aft... |
I work on a small team, in a medium-sized company, most of which isn't involved in software development. I'm the newest and least-experienced developer and had no professional or academic background in software before starting, but I'm quite pleased with how respected my input is and am grateful for being taken serious... |
When dealing with an enterprise application, I often heard the requirement of "reporting function" "run reports", "generate reports", etc. What is it referring to?
|
"If you really want OO sugar - go use C++" -- was the immediate response I got from one of my friends when I asked this. I know two things are dead wrong here. First OO is NOT 'sugar', and second, C++ has NOT absorbed C.
We need to write a server in C (the front-end to which will be in Python), and so I am exploring be... |
I'm a huge fan of writing asserts, contracts or whatever type of checks available in the language I'm using. One thing that bothers me a bit is that I'm not sure what the common practice is for dealing with duplicate checks.
Example situation: I first write the following function
void DoSomething( object obj )
{
Cont... |
Wikipedia says:
Not equal
The symbol used to denote inequation — when items are not equal — is a slashed equals sign "≠" (Unicode 2260).
Most programming languages, limiting themselves to the ASCII character set, use ~=, !=, /=, =/=, or <> to represent their boolean inequality operator.
All of these operators can be ... |
Most questions like this only seem to apply for big pieces of software for companies with money. I'm developing a small application targeted at individuals.
Informally speaking, I want to sell the application to users, but allow them to fix and modify it(but not redistribute).
Practically and legally speaking, how woul... |
I’ve just watched this talk by Daniel Spiewak where he talks about the advantages of structural typing as compared to Scala’s ans Java’s nominal typing. One example for this difference would be the following Java code
public interface Foo {
public int length();
}
public interface Bar {
public int length();
}
Foo f... |
As a long-time C# programmer, I have recently come to learn more about the advantages of Resource Acquisition Is Initialization (RAII). In particular, I have discovered that the C# idiom:
using (var dbConn = new DbConnection(connStr)) {
// do stuff with dbConn
}
has the C++ equivalent:
{
DbConnection dbConn(c... |
A bit of a background here - we are a small team (of 5) of RAD developers responsible for internal software development in a big non-software company. "Internal software" varies from a desktop .NET application using MSSQL server as a backend to Python scripts running on the background to MS Word documents and template... |
I have a general repository for small utilities (which were deemed too small at the time to warrant their own repository. 'Nother problem of itself maybe), some of which are deprecated and likely to never serve again. But one rule where I work is to never throw anything away. Deleting from SVN means it's not really del... |
I was double checking the URL for the CDN version of jQuery this morning, and noticed that there are three different locations now.
Is having multiple networks hosting a product bad, or even self-defeating? I thought a primary advantage is that as more and more sites use a CDN version, that the odds the library being ... |
I have very limited experience in software project management roles, and I was asked this question by another engineer and I was sort of stumped.
How do I measure when a software project is complete?
The part I'm struggling with is the "measure" part. I know there are measurements such as EVM, but they are more focused... |
I know a few programming languages. The most marketable ones being Java, Javascript, as well as non-trival stored procedures. I also know some Python, Actionscript and a few dinosaurs language. I am starting up a toy project with Scala/lift. I enjoy each language for its own features and the paradigms they encourag... |
Possible Duplicate:
Colleague unwilling to use unit tests “as it's more to code”
I've been trying in the last couple of months to convince one of my colleagues to start unit testing his code and drop the old "print, run, debug" way of doing things. I need clear and elaborated proofs that unit testing increases your ... |
I have an ASP.Net application that is using a MySQL database. My queries are not executing as fast as I would like them too. Are there some standard ways to increase the speed of a MySQL database short of putting it on a faster PC.
For example, (I'm not sure if these are true or not) using prepared statements over tran... |
Business Analyst creates a requirement. Requirement implemented by developer. BA performs QA. Bug report includes various bugs that were never requirements.
E.G.
A requirement is made to display a report. The report is displayed. In QA, the analyst see's that a user can enter invalid data. The invalid data makes... |
I'm wondering about functional or non-functional requirements. I have found lot of different definitions for those terms and I can't assign some of my requirement to proper category.
I'm wondering about requirements that aren't connected with some action or have some additional conditions, for example:
On the list of ... |
A while ago, I decided to start programming. I really, just jumped into a language (Perl) and went from there. What I regret is that I just jumped in:
I didn't learn the basics (if you would call them basics).
I didn't learn about Computer Science.
This issue, I believe, is holding me back from my true potential. Where... |
Possible Duplicate:
How can I learn to write idiomatic C++?
Besides the obvious answers of "use g++ instead of gcc, and cout instead of printf", how can I ensure that my toy project is teaching me proper C++ paradigms and patterns?
Backstory: I've never written a line of C++ beyond Hello World, and I've chosen wha... |
In a couple of months a colleague will be moving on to a new project and I will be inheriting one of his projects. To prepare, I have already ordered Michael Feathers' Working Effectively with Legacy Code.
But this books as well as most questions on legacy code I found so far are concerned with the case of inheriting c... |
I'm making a group of two or three simple javascript games for fun. After someone finishes one game, they'll be presented with a harder or easier version of another game depending on whether the original game was won or lost. I have a high-level question about the design of things:
So far I've created a class for one g... |
I want to get into web stuff, and thought of going with PHP+MySQL. I have experience in C#, C++, desktop graphics, but no web stuff besides HTML, CSS which I started learning 2 months ago.
On SO PHP-book question, the highest rated book is "PHP Objects, Patterns and Practice". However, I'm not sure if it's a book to st... |
I have been playing around with C# for Windows and ASP.net MVC development for some time now. But I am still unclear on a few areas. I am trying to understand the basic difference between and performance issues with using and interchanging similar kinds of Generic Collection Interfaces.
What is the basic difference be... |
One programmer committed some work to the SVN repository, then went home. After he left, the Hudson automatic build failed. Another programmer saw this, and after looking through the code changes, detected that the problem was the absence of one library. He added this library to SVN and the next build completed success... |
All of the projects that I've had to deal with so far have only required a single database on a single server. I'm interested in learning more about how projects that need to scale move to multiple databases and/or servers to help manage the load. I'm aware of High Scalability, but I'm particularly interested in some ... |
My boss is currently attempting to apply some development standards to our team, so we had a meeting yesterday to discuss the standards which was mostly going well until she brought up:
All DB tables will have a CreatedDate and LastUpdatedDate column, updated by triggers.
At this point our team suffered an opinion sc... |
While this may be a very subjective question I was wondering if there's a place (or many places) on the web where one can read up about good coding and performance tips for different languages and how they may compare with others?
For example in AS3 it's faster to multiply rather than to divide, is this the same for JS... |
So now Eclipse has offered Xtend and JetBrains is offering Kotlin - both of which seem to be watered down versions of Scala. My question is why? I've played with Scala a bit and it's not that hard. Is this just a reaction to the inherent difficulty of the leap from imperative to functional or is there something else ... |
For the amount of web developer job interviews I've been to, I'm somewhat surprised that no one has brought up Zend certification. Has anyone ever been certified before, or is it a waste of time/money?
|
The principle Tell Don't Ask says:
you should endeavor to tell objects what you want them to do; do not
ask them questions about their state, make a decision, and then tell
them what to do.
The problem is that, as the caller, you should not be making decisions
based on the state of the called object that result... |
I know that big websites suffer from scalability issues and I guess that more servers (hardware) can help to handle scalabililty issues but I see that big websites are stuck about scalability even if they can handle the cost of new servers.
So why can big companies not handle scalability issues by more servers?
|
Possible Duplicate:
How to share code as open source?
I have a bunch of code.
I want to make it open-source.
What, technically, do I need to do? Add a bunch of text on the top of each file? Upload it somewhere? Do a rain dance? All of the above? Does it matter which license it is?
|
I just asked this question at SO about some bugginess I am experiencing with jQuery and IE8, and someone commented that he was appalled that I would mix JavaScript with jQuery (he has since deleted his comment for some reason).
This person had a high reputation, relative to mine (3000+), so I don't want to ignore his c... |
I have a homework assignment and I need to evaluate which approach is better according to GRASP "Protected Variation". I found a question on Stack Overflow about the separation of header and code files in C++.
However, what I want to know why Java does not follow C++ in promoting the separation of class declarations an... |
I was wondering: it now seems to be more and more common to see people/framework putting cryptographic tokens in the URLs their webapps are generating (to prevent quite effectively against quite some attacks). It is advised by OWASP etc.
However I was wondering: what was the earliest known usage of this technique (spe... |
I'm looking for advice from experienced developers on this question.
In my work there's a need for a lot of one-off code. It's tempting to just dip into the right python/perl library calls to do these little tasks as quickly as possible.
I used to be of the philosophy of - "use most efficient tool for the task". Howeve... |
Note: I am surprised that this hasn't been asked before, and if it has I could not find it in a search.
I've been on tons of websites, I've read tons of articles, and I have heard tons of explanations. Most of them were good, but they were all either to broad or too complicated or just plain bad. So my question is , ho... |
Some friends and I are starting up a hobby programming project.
I wonder if there is any good method/tool/service which lets us collaborate on UML diagrams online.
This can be in any form (online direct edit, source-control style, etc.) as long as we can make changes independent of each other.
|
In SICP, the authors state (Section 1.1) that there are three basic "mechanisms" of programming languages:
primitive expressions, which represent the simplest entities the language is concerned with
means of combination, by which compound elements are built from simpler ones
means of abstraction, by which compound ... |
I hope this is the right forum for this ... Well, in C, the standard library uses usually (void* buffer, int size) when referring to some data buffer. I wonder if there is a rationale for this order instead of (int size, void* buffer). I couldn't think of any good reason, and it seems to be an arbitrary choice, but I'm... |
Upon my assignment to a project, I discovered that many message classes were received and then kept intact and passed around inside the receiving application. When these messages changed, code throughout the entire application had to be changed. Since this problem, I have gotten into the habit of converting messages to... |
Answering a question about order of parameters it struck me that strcpy (and family) are the wrong way round. Copy should be src -> destination.
Is there a historical or architectural reason for the dest,src order in these 'C' functions? Something to do with optimization of the stack on the PDP-8 or something?
|
Recently I have a discussion with some of my colleagues at my work because they said that it's better have in a .DLL a string connection encrypted. And I said why just don't use the string connection defined in the web.config encrypted? it's the same and it's better because entity framework, for example looks for the n... |
I am writing a wiki article and wondering what is the proper way to write a directory scheme?
I am doing something like
main folder
- sub folder
- sub folder
...
But I'm stuck after that.
Any help?
|
A project I'm working on was hosted on a svn repository at bettercodes.org. This was under another user's name and that repository is now unavailable.
The person responsible for the project was sent an export from Eclipse and I had a more or less up-to-date project on my machine. I could see no other option than to com... |
I am a programmer in C and C++, although I don't stick to either language and write a mixture of the two. Sometimes having code in classes, possibly with operator overloading, or templates and the oh so great STL is obviously a better way. Sometimes use of a simple C function pointer is much much more readable and clea... |
I've seen it done as a free-for-all where the scrum master just asks everyone to throw out comments. Or a time-boxed session where "anonymous" comments are posted on the walls bucketed by category. My current team is constrained by being spread out, so it has be done online/over the phone. What is everyone's best exper... |
I'm at the pre-release stage of an open-source PHP project, one which I hope will be used by other developers in their own projects. The project doesn't currently support namespaces and I'm trying to evaluate if it should use namespaces or the PEAR naming convention of Dir_Subdir_Class, which seems to have all of the ... |
Being a relatively new web-developer I am surprised that these libraries didn't exist before. Is there a particular technical or historical reason that at around Sep 2010, a sudden development and interest in client-side javascript RIA applications and libraries?
http://www.google.com/insights/search/#q=backbonejs%2Ca... |
Are complex numbers used in programming? If they are what is their significance? What IDEs and languages use them? And would it be recommended to learn how to implement them for a programming job (if so please specify what job)?
I've been working in Eclipse and just studied the importance of complex numbers in math and... |
I often talk to programmers who say "Don't put multiple return statements in the same method." When I ask them to tell me the reasons why, all I get is "The coding standard says so." or "It's confusing." When they show me solutions with a single return statement, the code looks uglier to me. For example:
if (condition... |
We have a process that may last between a few seconds and a few minutes. As such, we may update just a few records or thousands of them. The process can be committed only when everything has been done correctly.
Recently we have begun having problems when attempting to commit transaction as they were marked as "rollba... |
I am a C# developer.
My observation of the IT industry as a C# developer is that the technology keeps changing or being updated by Microsoft like LINQ, WCF, and WPF etc.
OOP has been the fundamental for all kinds of developments that we see today in any language.
My question is,
Is it good if I am a decent programmer ... |
I'm working on a contract at present where I'm essentially working as a subcontractor for a fairly big digital agency. The real end customer is a big corp.
So far, I have of course done an amazing job :)
The agency had a "spec" up front - basically a "sitemap" for the app. This was my "blueprint".
Inside the first wee... |
The question title may not be correct.
I have worked in a very big ASP.NET web application (without using MVC), there I used a simple error handling strategy :
Enclose every statement in try..catch block
Have a error label on each page at the very top
If any exception occurs then show the error description on the Er... |
My company is going to hire an external developer to create some new modules and fix some bugs in our PHP software.
We have never hired an external developer by the hour before. How can we protect the source code? We are not comfortable giving out source code and were thinking that everything remained under a surveilla... |
I'm a proponent of properly documented code, and I'm well aware of the possible downsides of it. That is outside of the scope of this question.
I like to follow the rule of adding XML comments for every public member, considering how much I like IntelliSense in Visual Studio.
There is one form of redundancy however, wh... |
I have the following problem: I have a database containing more than 2 million records.
Each record has a string field X and I want to display a list of records for which field X contains a certain string. Each record is about 500 bytes in size.
To make it more concrete: in the GUI of my application I have a text field... |
I'm simulating a double click programmatically and I want to have a slight pause between both clicks in order to better simulate a real user.
I know the interval should be less than GetDoubleClickTime but am not sure what would be a good time to choose. Does anyone know of any data on how fast a typical person perform... |
Is this an antipattern? It is an acceptable practice?
try {
//do something
} catch (Exception e) {
try {
//do something in the same line, but being less ambitious
} catch (Exception ex) {
try {
//Do the minimum acceptable
} catch (Exce... |
Warning: This is a long post.
Let's keep it simple. I want to avoid having to prefix the new operator every time I call a constructor in JavaScript. This is because I tend to forget it, and my code screws up badly.
The simple way around this is this...
function Make(x) {
if ( !(this instanceof arguments.callee) )
r... |
I know that in general cookies themselves are not considered robust enough to store authentication information.
What I am wondering is if there is an existing design pattern or framework for sharing authentication across subdomains without having to use something more complex like OpenID.
Ideally, the process would be ... |
I'm developing a multilingual PHP web application, and I've got long(-ish) texts that I need to translate with gettext. These are email templates (usually short, but still several lines) and parts of view templates (longer descriptive blocks of text). These texts would include some simple HTML (things like bold/italic ... |
I'm interested in books that would introduce / explain the theory behind programming and programming languages. My logic is that by truly understanding the theory behind programming it will only take a few weeks to pick up new languages and implement some simple software.
As far as the type of books I'm looking for th... |
I hear a lot about keeping methods short and I've heard a lot of programmers say that using #region tags within a method is a sure sign that it is too long and should be refactored into multiple methods. However, it seems to me that there are many cases where separating code with #region tags within a method is the sup... |
Call me paranoid, but I really like to keep my stuff secret, but readily available on the cloud. So, asking this question.
How safe and reliable is encryption software (e.g., truecrypt)? The reason I ask is that, what is I encrypt my data today with this software and after a couple of years, the software is gone ! Wha... |
I have an open source project, but I don't want to use my real name in the license file. Legally, can I just use my project hosting username instead?
I know programmers Are Not Lawyers™, but I'm looking for advice from people who may have dealt with simlar problems.
|
Take the following tree:
50
40
30
20
10
Which node will be balanced first? 50 or 30
Case 1: 50
The tree is
30
20 40
10 50
Case 2: 30
The tree is
40
/ \
20 50
10 30
Well,... |
My company wants to start using Scrum, and in real scrum there is no place for a real team leader (manager).
What is the next step for the dev team leader? Should I be a (chief) system architect/tech leader or search for another job in management?
I like the management part and the technical part and the target is VP ... |
I just purchased the book 'Pearls of Functional Algorithm Design' by Richard Bird. Unfortunately, the book doesn't have any section that describes the notation that is used.
You can view the contents of the book by going to Amazon's page, and clicking on the book cover to get a sneak peak inside.
http://www.amazon.com... |
My company needs to hire a PHP developer, but nobody has PHP knowledge in my company and we find difficult to test for PHP skills. If it were a C/Java developer I would ask him to write a quick implementation of the Game of Life, but PHP is a completely different language.
I saw this test with interest:
http://vladalex... |
I stumbled upon Greg Young's talk 7 Reasons why DDD Projects Fail where he mentions something he calls DDD-Lite at 7:20.
Summarizing, he basically says some use DDD as a pattern languages (entities, repositories, value objects, services, etc) without doing anything else related to DDD. He postulates 60% or more of doma... |
I'm intrested to know if there exists a tool that lets you input examples of valid documents and lets you then generalize from that to a reusable parser.
I can imagine this, but everytime i start learning about parsers it gets to the granularity of something like lex and yacc and it seems more complicated than my insti... |
In my spare time, I've been designing a CMS in order to learn more about actual software design and architecture, etc.
Going through the SOLID principles, I already notice that ideas like "MVC", "DRY", and "KISS", pretty much fall right into place. That said, I'm still having problems deciding if one of two implementat... |
For a long while the default guide to latest standards support for browsers was the Acid 3 Test. I've just run this on Windows 7 (x64) for Chrome 15.0, Firefox 7.0, Safari 5.1 and IE 9.0 and they all score 100. Some of the animations could be smoother but on the whole there's not much to differentiate them.
I've then l... |
I'm a senior in college that hasn't done much image processing before (except for some basic image compression on smartphones). I'm starting a research project on machine learning next semester that would require some biomedical image processing. What's the best way to get up to speed with the basics of image processin... |
My classes are following this structure
Service Tier (creates and maps InputDTO to DB Data)
DAO Tier (actually executes DB calls)
When I write service tier JUnit tests, the DAO tier is called, and this expects an actual DB connection and getting data from the DB.
Should I be mocking the DAO tier completely from the s... |
I'm looking to hire developers and I wish to test them. I have been especially told by my boss that we should have programmers on board that can consult on banking sector software and I'm to come up with the test. Now I've never done Java EE development in depth and my knowledge of it isn't the greatest but I've not ha... |
If I have a datastructure which is the fastest way I could insert values into it in a specified range?
For example if I had a method:
myDatastructure var=new myDataStructure();
var.insert(2,1000);
it would mean that I get a most optimised way of getting a datastructure holding values from 2 to 1000 in each of index se... |
I would like to set up my computer so that I can develop in .net, C#, Java, ActionScript, JS/CSS, and functional languages such as Scala or Haskell. However, I want to do this with the least amount of full-featured IDEs to learn / programs taking up harddrive space on my computer / running multiple IDEs simultaneousl... |
Sometimes I stare blankly into space or sketch ideas and write some pseudo codes on paper. Then I scratch it out and start again, then when I think I have the correct solution for the problem I begin writing the code.
Is it normal to think for days without writing any code? Is this a sign that I am approaching the prob... |
I am currently developing a hosted solution in ASP.NET using MVC3 and Entity Framework. This product will then be made available to a number of clients as a hosted solution.
As the data stored by each client will be critical to their business, we anticipate that many of them will insist that the data is stored in an en... |
The company I work at recently hosted a web service in Windows Azure and announced that. Now trade online magazines say lots of meaningless stuff like "company X moves to the cloud", "company X drops desktops for the cloud", etc.
Looks like there're lots of materials out there (starting with Wikipedia) that are very le... |
I'm experimenting with automatic deployment / continuous integration and had a talk with my team lead.
I told him I'm investigating creating build/deployment scripts in PowerShell and he said automatic deployment is very easy to set up in TFS using a GUI and I should research that instead. I have zero experience with T... |
I have seen other developers using static classes as namespaces
public static class CategoryA
{
public class Item1
{
public void DoSomething() { }
}
public class Item2
{
public void DoSomething() { }
}
}
public static class CategoryB
{
public class Item3
{
public... |
Here's a common situation:
You need to implement a bulk operation in an application that uses an ORM framework.
After the first pass, you've noticed significant performance problems.
Here's my question:
In this situation, should you favor a solution that includes raw SQL?
Or are there well-known design patterns th... |
This is an Agile development project and I do not have the ability to change that.
The design that will be the fastest and most obvious for the first phase of our project will not be compatible with the needs of our second phase. The change would not be difficult to implement now but it would take a little more time t... |
To my way of thinking, a for loop is used to iterate over a known or determinable range.
String[] names = //something;
for ( int i = 0; i < names.length; i++ ) { //do stuff }
which is equivalent (scoping of i aside) to :
String[] names = //something;
int i = 0;
while (i < names.length )
{
// do stuff
i++;
}
In ... |
I read here that you should avoid coding JavaScript inline (see item #1).
It sounds like a great idea; however, I'm not sure how to use js to select dynamic content without setting the id in the function call inline.
For example, I have a simple blog. The comments are hidden, but can be displayed by clicking an anchor ... |
Can you use Google Analytics to track visitors/downloaders for a Google Code project?
I've searched google for an answer but I get results about Google Analytics as a Google Code project itself and not for applying it to a Google Code project for visitor/download data.
|
This question is being asked for the purposes of evaluating whether or not attempting to use things I picked up in college was a good idea, or even remotely defensible.
Last year I wrote a 'formula creator' for figuring out what to do with fields or how to populate fields of HL7 data. The fact that it's HL7 data is al... |
I have a question that I did not find an answer for except the following answer that does not meet my requirements:
"Because James Gosling didn't want to"
I know that Java can have interfaces (only pure virtual functions, no attributes), but it is not the exact same thing as class definitions.
|
If I were to download some open source code that does some neat thing that I am needing, but doesn't have nearly as many options or bells and whistles that I need... and I make a TON of changes to where some of the base code is still there from the open source project, but a lot has changed and a lot has been added... ... |
We all know what a value is. A type is the type of a value. A kind is (loosely) the type of a type. A type constructs a value; a kind constructs a type. So what is the type of a kind, a thing that constructs kinds?
Is there such a thing? Does it have a name? Is it useful?
|
On my team, we often require the most senior programmers to train/mentor the brand new junior programmers. However, these same senior programmers are the ones who are doing the bulk of the real, important work.
I've tried to argue to my manager that it makes sense to have the junior programmers, who are showing a high... |
Possible Duplicate:
When is optimization not premature and therefore not evil?
Whilst designing my own .Net SQL access library, I found that I want everything thing to run as fast as possible so I tend to look at the fastest ways of doing things. This often gets criticised as pre-mature optimisation when I am just l... |
We have a lot of programming languages. Every language is parsed and syntax checked before being translated into code so an abstract syntax tree (AST) is built.
We have this abstract syntax tree, why don't we store this syntax tree instead of the source code (or next to the source code)?
By using an AST instead of the ... |
I'm starting to learn Vim, and following some of the advices given here in stackexchange. I'm beginning to use it in some toy projects and I'm cool with that.
But I started to wonder how you can be productive without opening other files all the time just to know how's that class' Name, what's that macro included in oth... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.