instruction stringlengths 34 36.1k |
|---|
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 '... |
I started a new job working on an application I'm vaguely familiar with, and it's in Perl! I come from a PHP and Java background, so while I understand the basics, there are lot of nuances in Perl that make it troublesome.
I'm supposed to be a UI developer, but the smallness of the office requires me to learn and do a ... |
I suppose this question is going to be immediately flagged as subjective, but which do you think is better:
double volume(double pressure, double n_moles, double temperature) {
return n_moles * BOLTZMANN_CONSTANT * temperature / pressure;
}
or
double volume(double P, double n, double T) {
return n*R*T/P;
}
In oth... |
SOLID includes the Liskov substitution princicple
which has the notion that “objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program”.
Since static classes with static methods (a bit like the Math class) does not have instances at all, is my system c... |
In JavaScript, we have something called undefined. I said something, because I really don't know if it's a base class, or a built-in variable, or a keyword, or anything else. I just know that it's there.
To see it in action, you can simply write:
undefined;
typeof undefined;
Can anyone please explain to me why this th... |
What is the best framework for start: rails or sinatra? I heard that sinatra is more flexible but rails has a lot of documentation and tutorials. What's your choice?
|
Recently my boss suggested that we post logs of our service that is hosted on Windows Azure into twitter. His idea is that it's conveniently readable and if Azure cloud fails logs persist. He also said, lots of people do this, I Googled and couldn't find any data about this.
Currenly my concerns are the following. Firs... |
I have heard that there will be a lot of changes done in C++ because of the new standard (C++0x). My question is: What are the major changes, and will C++0x be compatible with C++ 98 and C ?
|
I have an initial phone interview coming up with a company for a Senior Web Developer position and in the email they asked to prepare by signing up on their site because they'd like to hear my thoughts about it and suggestions for improvement.
I've heard stories before of companies that do this. They interview 10 peop... |
A team is experiencing difficulty releasing software on a frequent basis (once every week). What follows is a typical release timeline:
During the iteration:
Developers work on stories on the backlog on short-lived (this is enthusiastically enforced) feature branches based on the master branch.
Developers frequently p... |
Given this pseudo code:
class B { }
class A : B
{
int val;
};
alpha = new A();
What arrow do I draw between alpha and A in a UML class diagram? Is this even something UML is meant to do?
+-------+ +-------+ +-------+
| alpha | --??-- | A |------|>| B |
| | | | | ... |
I am aware that floating point arithmetic has precision problems. I usually overcome them by switching to a fixed decimal representation of the number, or simply by neglecting the error.
However, I do not know what are the causes of this inaccuracy. Why are there so many rounding issues with float numbers?
|
I don't know why, but I always feel like I am "cheating" when I use reflection - maybe it is because of the performance hit I know I am taking.
Part of me says, if it is part of the language you are using and it can accomplish what you are trying to do, then why not use it. The other part of me says, there has to be a... |
My task lays in the area of text mining / labelling, more particular extraction of bibliographic citations (references) from the plain text, as shown here:
Basically, for the input text the algorithm should recognize:
The beginning and end of citation
Journal name, title, author, issue, volume, pages
This task was a... |
Similar to this question https://softwareengineering.stackexchange.com/q/77466/20799, are there any communities out there where I can get my code reviewed. Ideally this would be a private thing between you and the reviewer as it would be large chunks of a full, commercial project, the the whole thing would have to be u... |
There are over 100,000 questions on Stack Overflow tagged as questions relating to JQuery troubleshooting/usage. Compare this to the 124,000 questions on stack overflow that are tagged for JavaScript issues. We are very close to almost half of all JavaScript related questions on Stack Overflow being attributed to JQu... |
We are working on LoB app with lot's of content. XAP download will be rather large I think for one time download. I'm planning to break solution into separate projects.
Not sure why - but I DO NOT like many many projects in solution. IMO it is not very good idea. Even when we were working as a large team - it was pain ... |
I've been in the financial engineering arena (after BA Math and BA Computer Science) for about 5 years (20% analysis/programming, 80% communicating) and take pride in my ability to communicate with people and discuss technical problems (i.e. interacting with a team). I love this part of my job. Going to the white boa... |
I asked this question quite some time ago: How do you name your private variables in C#?
In one of the answers, I was pointed to Microsoft's MSDN page that shows that private variables/fields should be named like this:
private int myInteger;
But a parameter would be:
void SomeMethod(int myInteger)
and a local variabl... |
I have had a discussion with someone about unit/integration testing with web applications and I have a disagreement about 1 core idea. The issues is that the person I am talking to think that the database the unit test work off of should have pre-populated data in it and I think it should be completely empty before an... |
I am studying data structures right now, but I still need to find a teacher/site/book with a clear explanation of the macro aspects of this topic.
What I mean is: most lessons/text books mix everything together, with no logical structure. They start with linked lists, then talk about stacks, queues, heap priorities and... |
I was now talking with some people and they told me that if i was intrested in a job in the future for Java programming i should not spend too much time only learning Java SE i should spend time learning Java EE instead.. Now that brought me to some questions..
Java Enterprise Edition why use this ? What can i make wit... |
Lots of big companies, from Apple to Microsoft to Google, are putting more and more money into creating tools that will allow anybody to create a website with a WYSIWYG editor.
For example, this email I just got from Adobe:
Build websites as quickly and easily as an Adobe® InDesign® layout.
Currently in beta form, the... |
What is the difference between unit testing and integration testing when it come to web development (where 90-95% of the code relies on a database)? One thing I here all the time is that unit testing should not deal with databases and integration testing should. The issue I have with this is that to me that means the... |
The number of Linux distributions is large. Someone wanting to volunteer with one of them might have a hard time picking between them, because it's hard to sense the culture, environment, and level of community and esprit de corp. Also, some might be very strict with long processes before you are trusted, or else muc... |
There seem to be a lot of developers who write their SQL by capitalising the keywords:
SELECT column
FROM table
INNER JOIN table
ON condition
WHERE condition
GROUP BY clause
HAVING condition
I'm wondering why people stick to this approach? Clearly, it's a long established convention - but I've never run into... |
The books and documentation on the MVC just heap on using the Stateful and Stateless terms. To be honest, i am just unable to grab the idea of it, what the books are talking about. They don't give an example to understand any of the either state, rather than just telling that HTTP is stateless and with ASP.NET MVC micr... |
Sometimes (rarely), it seems that creating a function that takes a decent amount of parameters is the best route. However, when I do, I feel like I'm often choosing the ordering of the parameters at random. I usually go by "order of importance", with the most important parameter first.
Is there a better way to do thi... |
I've been reading about systems that employ transactions to provide fault-tolerance -- SQLite, for instance, implements a journal that allows the database to be rolled back to a known state in case of a failure.
Most of the systems I've been reading about write the current state to the journal and use this to roll back... |
When creating a library, must I ensure that the private methods must work as expected when called not by other methods of the same class, but by another library through reflection?
For example, if a private method private DoSomething(int number) expects that:
number is a positive non-zero integer, and:
a private varia... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.