instruction
stringlengths
34
19.9k
Possible Duplicate: Importance of learning to google efficiently for a programmer? Avoiding lengthy discussions, as a senior level student in CS, how can I get away from Googling problems I run into? I find myself using it too much; I seemingly reach for the instant answer and then blindly copy and paste code, hopin...
In a company working on a long term software project, there are 6 to 9 developers working in the same office. The development team uses JIRA for bug tracking and CVS (and some SVN) for version control of different Java Web Apps related to the software application. The team uses REST to communicate between the Web Apps ...
I am creating a web application. I have primarily used Javascript specifically jQuery. Because of some very specific functionality, I am running into practical limitations of Javascript--they're not hard limitations but stuff that I would find easy in Java, like making an equation editor where you can edit directly a...
I have a method like this in my UI code: void MyDialog::OnCommandSaveData() { std::list<MyClass*> objects; service_->GetAll(objects); dataService_->SaveObjects(objects); AddMessage("Saved data.\n"); } Because this method can take some time, I want to kick off a thread to do this. I'm using C++ and I p...
My company is reevaluating what kind of web framework we want to use. We are currently using the Ext 4.0 framework but there are questions being raised that it may not be the right framework to use. I like what Ext has to offer (rich GUIs, data package and class system) are there other frameworks out there that are s...
I've been reading up a lot lately on various web application deployment processes using SVN or GIT, with a view to redesigning how we currently deploy where I work. As is the way with many flavours of Agile, it's assumed that anything committed to master or trunk is production ready. Both GitHub and Etsy, http://codeas...
In the past week I've been meeting and speaking with someone who's interested in finding help on developing a game (built using php and mysql, with a little bit of javascript). I agreed to help out, however, now that I've seen the code and file organization, I don't know if it's feasible for anyone (not just myself) bu...
I am reading this and I came across: The Golden Rule of Platforms, "Eat Your Own Dogfood", can be rephrased as "Start with a Platform, and Then Use it for Everything." You can't just bolt it on later. Certainly not easily at any rate -- ask anyone who worked on platformizing MS Office. Or anyone who worked on platform...
Possible Duplicate: VB.Net vs C# debate Are there any actual reasons why company should choose VB.NET over C#? I work for a company which develops medical software and switched from VB6 to VB.NET several years ago. There were two reasons to switch to VB.NET but not to C# at that moment: VB.NET is more similar to VB...
I am working in a software company where we are mostly working on websites which are based on open source like dotnetnuke or nopcommerce or any other and i am totally bored with all this as there is no scope for doing something new as most of the code is already done in these open source i know the open source are go...
I'm working on a WPF application with views that require numerous value conversions. Initially, my philosophy (inspired in part by this lively debate on XAML Disciples) was that I should make the view model strictly about supporting the data requirements of the view. This meant that any value conversions required to tu...
I have a problem that involves several machines, message queues, and transactions. So for example a user clicks on a web page, the click sends a message to another machine which adds a payment to the user's account. There may be many thousands of clicks per second. All aspects of the transaction should be fault tolera...
Should I care about moving invariants out of cycle scope if it worsens code readability? Let's take a look at a simple example: for (var i = 0; i < collection.Count; i++) { ... } vs. var collectionCount = collection.Count; for (var i = 0; i < collectionCount; i++) { ... } The performance of second piece of code...
We're using JIRA to keep track of issues in our software projects. One effect we noticed is that we often create a new issue but we don't knw yet when/if the problem is going to be fixed at all. So we invented a fake 'Distant Future' milestone which such issues get assigned to. As it happens, the pile of issues assigne...
Let's say, I have one or more web app I find interesting, and as I want to do something similar, I would like to know on which technology they are based (programming language, database, web server, framework, ...). Is there any site where such information is centralized? If not, where should I look for this information...
After reading the article- When to Use Delegates Instead of Interfaces (C# Programming Guide), I need some help understanding the below given points, which I found to be not so clear (for me). Any examples or detailed explanations available for these? Use a delegate when: An eventing design pattern is used. It is des...
My company is one which has grown up rapidly over recent years in multiple territories. We are not a software company per se, but a technical one who have developed various bespoke applications inhouse. Some of these are now sold as SAAS. I am personally responsible for 3 of these applications: all internal web applica...
HTML4 / XHTML1 allows only GET and POST in forms, now it seems like HTML5 will do the same. There is a proposal to add these two but it doesn't seem to be gaining traction. What were the technical or political reasons for not including PUT and DELETE in HTML5 specification draft?
At our shop we use SVN for source control and CruiseControl for CI on handling automatic builds and deployments to our development, test, and integration environments. This all works smoothly however due to hardware and resource constraints our integration environment is not a 2 server load balanced environment like ou...
We are currently developing a public API for our app. The methods on this public API are mostly putting together functionality in different corners of the system. An example would be: (names have been changed to protect the innocent) public String createAppUser(String app, String name, String email, byte[] pwd) { ...
We have to extend a huge java project that makes use of frameworks like maven, spring, struts, freemarker and closure templates. We do have access to source code but barely any documentation, and we have to extend this system. Our only solution is to find the place in the existing code, where something similar is alrea...
I often feel that there's something wrong when I code blocks such as: function foo (arg){ // arg: a SomeClass object ... } or function foo (arg){ if (Object.prototype.toString.apply(arg) !== '[object Array]') throw new Error("Parameter must be an array"); ... } . With a statically typed language I...
It appears that many interview related questions on this site are focused on testing traditional CS knowledge, such as: Algorithms Data structures Programming language/environments Obviously the site is called "programmers", so that is to be expected. However, I'd also argue that there are many other aspects that m...
Herein, we consider a server-client architecture. Suppose we keep the details flexible, but there's more than one layer of servers supporting our hypothetical service. The general question is "When and how much do I validate client data?". From other questions and answers I've read, the answer may be summarized as one ...
I'm a PHP / Java / Objective-C programmer, looking to finally learn some MS technologies, to increase my marketability, etc. I am looking at these two books, can anyone experienced in the field suggest one over the other, or another book that'd be good for learning C# / .Net, etc? What impressed me about "Pro C# 2010 a...
We have a legacy database full of stored procedures. These stored procedures are somewhat CRUD-categorized but upon inspection of some procedures, they are not "simple" as they might update, delete, whatever other records in other tables. So to my mind (correct me if I'm wrong) it would seem that using an ORM would be ...
I have multiple projects on Git that I eventually want to bring others into. However, right now it's just me and I use Git and GitHub very simplistically: no branches and basically just using the commits as a backup to my local files. Sometimes I'll go back and look at previous versions of my files for reference, but I...
I'm a self taught programmer; I understand the foundations of programming and what classes are, but my code tends to be messy with class methods interacting with a half a dozen other classes, and my structure is terrible. If someone else were to look at my code, I don't think they would be able to understand what was ...
I wrapping up an application I'm writing that I'm hoping will get a decent user base. It will be free and open source, but I'm interested in collecting some analytic data on the install base. Essentially a small version of Google Analytics, but for a desktop application instead of a website. Details I would like to co...
Pretty simple question, but something I haven't been able to find out. Who was the first person to describe the idea of a pointer? The abstract concept itself?
I believe I have a very good understanding of programming logic fundamentals (passing around variables, nested conditional statements, etc). I am currently going through a book on ASP.NET and am pretty much lost on all the Page Rendering Model, Custom Rendered Controls, Composite Controls, etc. I understand how to use ...
Being a young and fairly inexperienced developer recently employed by a "real" software company I'd like some opinions and pointers on how to do the following: Approaches on how to get familiar with a companies products , especially when you've no idea how it all works. The company I'm at now has one HUGE product , con...
I have seen a lot of exceptions - custom or integrated in the language (PHP) itself that have no differences but their class name. When extending default exceptions to use within your own code, are there any other things you could implement that are useful besides the more specific exception name that do not violate th...
In our company we have to dismiss a software and introduce a new one. I have received the task to follow and take care of the whole data migration. We use 3 different data sources (each containing different kind of information), whose records have to be merged into a unique target DB. Since the new DB has a different ...
Back in school some 10+ years ago, they were teaching you to use exception specifiers. Since my background is as one of them Torvaldish C programmers who stubbornly avoids C++ unless forced to, I only end up in C++ sporadically, and when I do I still use exception specifiers since that's what I was taught. However, the...
Currently we are working on some storage problems for log data from various servers and communication message logs (HTTP(S), XMPP). There will be many write operations and for read operations we will use search queries with filters. Should we stick with the classic relation database schema solution or concentrate on Ca...
I need a tool (for in house usage) that will format SQL code (SQL Server/MySQL). There are various 3rd party tools and online web sites that do it but no exactly how I need it. So I want to write my own tool that will fit my needs. First question is there any standard or a convention for how the SQL code should be for...
Being careful is usually enough to prevent problems, but sometimes I need to double check the branch I'm working on (e.g. "hmm... I'm in the dev branch, right?") by checking the source control path of a random file. In looking for an easier way, I thought of naming the solution files accordingly (e.g. MySolution_Dev....
I have a general question about the placement of javascript code in a AJAX-driven web application. At a previous job, we tended to throw everything in one monolithic file. When maintaining that file became too difficult, we split it up into multiple smaller files and "glued" them back together with a php "loader" (pret...
It seems to be a naive question, but I was unable to find an explicit definition and difference in meaning of the words "software", "program", "application", and "gadget". What is the correct (at least theoretically) way to use each of these words?
I face a problem nowadays, I have a really good book that explain OOP but it uses a language which I do not want to learn which is Java because my goal is to learn C#. And I don't know if I should understand OOP with Java at first and then learn C# or should I find any C# book even if the Java book is excellent in teac...
Trying to implement chart API in Java. But I am unsure of the mathematical formulas/concepts used in drawing each of the chart type. Can someone specify the mathematical concepts to be known for drawing each sort of the chart.
This one might get me slaughtered, since I'm pretty sure it's bad coding practice, so here goes: I have an AJAX driven site which loads both content and javascript in one go using Mootools' Request.HTML. Since I have initialization scripts that need to be run to finish "setting up" the template, I include those in a fu...
(FYI: I've just moved this question over from Stackoverflow on recommendation.) I just received a few emails, informing me that softpedia.com has added some of my "products" to their "database of scripts, code snippets and web applications". My products are in this case some smaller open source projects, which I have h...
I am working on a product that requires devices to exists anywhere in the world hooked up to the internet though cell modems or on WLAN lines which communicates to a server(s) that exists elsewhere in the world. When deigning the networking portion of the program i cant figure what the best option is for securing the ...
My team and I are very keen on doing Scrum "manual"-style (with paper and scissors). Though, we are struggling to find a tool to manage our backlog. The main requirements are: To be able to print the backlog in cards to stick to the whiteboard To be able to assign backlog items to the releases manually So far we hav...
I am writing an app at the moment that has some pretty extensive business logic based around dates. I have several hundred thousand records to test and testers who want to see how those records are handled, which has worked well so far, however, some edge cases are difficult to replicate. The reason is that most of the...
Our supplier's webservice is returning address objects (~30 fields) and I'm using LINQ and reflection to store the returned data straight into the databse. I loop over the attributes and set the value from the object to the LINQ class. I'm fairly new to refection and I'm worried this may be bad practice; it saves ~30 ...
Today I was having a discussion with a colleague that ViewModel is a general concept and existed before MVVM pattern. I believe ViewModel term is used anytime you create a class with Model like properties for showing on View that supports data binding like in ASP.NET and even in WinForms. Is the opposite true? Did Micr...
Take the original Boyer-Moore paper, for instance. It seems every time I look for an algorithm the paper I see referenced is talking about implementation idiosyncrasies on a PDP-10 or PDP-11. I know these were popular machines at one time, but not so popular as to account for the large number of references I see. Is th...
Background At a medical facility, staff can remove patient records (file folders) from a room. The room is locked using a standard tumbler lock (i.e., no swipe cards). The medical facility does not have much funding available. All staff members have a computer in their office (some computers are several years old). All...
I'm working with a DB2 database and I can't help but notice - these table and column names are really confusing! I realize that good names are important in every facet of software development, and it's quite possible that the non-intuitive names are unique to my experience, but someone told me that DB2 places severe re...
There are a ton of questions on Programmers.SE about whether or not taking extended time off is a good idea and what to do during that time off to maintain your skill level: https://softwareengineering.stackexchange.com/questions/31536/will-taking-two-years-off-for-school-in-a-related-field-destroy-a-mid-level-devel ht...
Today at work I did an update to production. The update involved replacing old items from two tables with new data. I of course did a back up of the tables before that. Well, now 6 hours after getting home I realized at shower that there was a foreign key reference on cascade delete for many tables and when I replaced ...
In my application I have several event handlers that perform some action in response to user interface events such as a button click or menu selection. The code in these event handlers looks like this for example: void MyDialog::OnCommandLoadFile() { char strFilter[] = { "Text Files (*.txt)|*.txt|All Files (*.*)|*...
I think I remember reading somewhere that one of the principles of good OO design is to write methods which take the least derived type possible, but return the most derived type possible? First, is there such a principle and second, what name would it go by? I'm looking for the name so that when I mentor other devel...
Second of all, I was wondering if anyone knew what the difference was between exceptions (in the realm of exception control flow) and Exceptions (such as used in Java). But are they there to basically protect the system from crashing by terminating the user program?
I recently enabled two factor authentication for my Google account. One of the ways of getting the second factor (the key that I have) is to install an Android app on my phone that displays a key for a short duration of time. What does it take to create a web server solution paired with a smartphone solution? I am usin...
For the past year I have been working on a series of applications all based on the Zend framework and centered on a complex business logic that all applications must have access to even if they don't use all (easier than having multiple library folders for each application as they are all linked together with a common ...
If Javascript is only allowed to access scripts from the same domain, how can a website create mashups which must read and modify content from another domain?
Here's the job I want to do: My project is a website where there will be a lot of comments. Those comments will be moderated: a moderator will connect, see comments and accept or refuse them. I need those things: the comments won't have any "moderator" associated. Which implies that when a moderator connects, the syst...
Possible Duplicate: How important is Domain knowledge vs. Technical knowledge? I often hear from my colleagues and sometimes from interviewers that, "There is nothing so great in having excellent programming knowledge. One must gain the domain knowledge as the 1st priority. If you have a good domain knowledge, ...
I'm a .NET developer and I've used TFS (team foundation server) as my source control software many times. Good features of TFS are: Good integration with Visual Studio (so I do almost everything visually; no console commands) Easy check-out, check-in process Easy merging and conflict resolution Easy automated builds B...
I've never written a php class before from scratch. But I guess you have to start somewhere right? I've got an idea, but need help with logic. Please tell me what you think. Below is shorthand obviously. In the planning stages. Class - -> type (recurring, single, day) -> Recurring days (4,2,3,4,1,2....etc. for ...
Possible Duplicate: Should newbies use IDE autocomplete (Intellisense)? I have a friend at school who wrote a program in VB.net in notepad, took it home fixed any errors that came up, and then compiled it. He used a textbook to get the hang of the relatively basic methods and properties he'd need (nothing complicate...
I was reading a topic on SO: Why are scripting languages (e.g. ...) not suitable as shell languages?. Especially I liked the answer by Jörg W Mittag, from which I learned interesting things about Windows PowerShell. So after more than 20 years Windows finally has a well designed shell (Windows 1.0 - 1985, PowerShell st...
Our company is starting a fairly large SOA initiative. We're doing a lot of stuff right: there's good communication; money for tools where appropriate; and we have brought on some good expertise to help us with the transition. We're trying to develop standards that we can follow as a group, and one of the proposed sta...
A friend in academia asked me for advice (I'm a C# business application developer). He has a legacy codebase which he wrote in Fortran in the medical imaging field. It does a huge amount of number crunching using vectors. He uses a cluster (30ish cores) and has now gone towards a single workstation with 500ish GPUS in ...
I have developed this android application and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get the project done for this amount even if it is outsourced to elan...
Is there a language or language feature that can handle "when" cases? That is, whenever some condition becomes true, in any scope or context, that extra code could be specified to execute? Note that this is different from a simple if, which must be in a particular scope and explicitly written. This when clause would al...
Is it perhaps time for enterprise systems to be developed to strict enforced standards? Many books list optional 'standards' and best practices, but these are purely suggested practices. Still, every time I look at the code for an enterprise system I have not been a part of, I spend a lot of time trying to work out the...
Firstly, I realize that this is a programming Q&A site, and not a place for legal advice.... Just trying to get a basic idea of what the downsides to using an LGPLv3 library might be. What are the differences between GNU LGPL v2.1 and GNU LGPL v3? In particular, I know that regular GPLv3 has many anti-drm and anti-...
I heard somewhere that C# 5 async-await will be so awesome that you will not have to worry about doing this: if (InvokeRequired) { BeginInvoke(...); return; } // do your stuff here It looks like the callback of a await operation will happen in the original thread of the caller. It has been stated several times...
I am looking into developing a C++ application to parse xml (using the rapidxml framework), and I would like some advice on how to approach this. The file I want to parse is a XML game file that defines a set of addons for a starship ('outfits'), which have several attributes in common (like name and cost), but also fa...
People often claim that they are following a '3-tier (or n-tier) architecture', and sometimes they then claim to be switching to a Domain Model. But I really never have understood what this mythical '3-tier architecture' is. It seems to have no formal definition. Whereas there are numerous references and examples aroun...
Per the Official Google Blog: Code Search, which was designed to help people search for open source code all over the web, will be shut down along with the Code Search API on January 15, 2012. Google Code Search is now gone, and since that makes it much harder to understand the features it presented, here's my at...
I have a device that can measure different values over time, one sample per second. After one measurement run I can export the data in form of a CSV-file. One row per second with timestamp and about 20 columns (values). The question now is how to store these data masses to make the data accessable. I want to work with ...
This post by Rob Conery (note the slug) says that development environment should be run inside a virtual machine. I see what he's saying and tend to agree, but still feel a little uneasy. Now that virtualization is so mature that even production systems run inside VMs speed is pretty much a non-issue, but as I say some...
I am learning functionnal programming with Haskell, and I try to grab concepts by first understanding why do I need them. I would like to know the goal of arrows in functional programming languages. What problem do they solve? I checked http://en.wikibooks.org/wiki/Haskell/Understanding_arrows and http://www.cse.chalme...
I am looking into writing a web service API and I am thinking of creating a REST service. What does OData means in this context? Can you please explain the difference between OData and REST?
I'm interested in forking a project released under a two-clause BSD license: Copyright (c) 2010 {copyright holder} All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: (1) Redistributions of source code...
In my work the language used to write applications is Visual Basic .NET. I read on internet and almost all the examples and questions are about C#. Is there any comercial application written in Visual Basic .NET? Is there any field for a VB Net developer?
If one looks at (perhaps older) manuals of Drools or some other rule engines, one of the illustrations of their added value is solving puzzles such as the Miss Manners puzzle (listed in the Drools Documentation). Now, such puzzles are naturally formulated and solved using Prolog or the more recent Constraint Programmin...
I'm a big fan of Git sub-modules. I like to be able to track a dependency along with its version, so that you can roll-back to a previous version of your project and have the corresponding version of the dependency to build safely and cleanly. Moreover, it's easier to release our libraries as open source projects as ...
I am supposed to work on web Services (using Apache CXF and Spring ) I was asked to get familiarized with certificate generation, as we will need to generate certificates going forward for the web services. One thing I knew is that they are using Glassfish server. I googled , but I didn't understand anything. I know ...
Possible Duplicate: Should newbies use IDE autocomplete (Intellisense)? Is it wrong or bad to use autocomplete? Having used an IDE for the last 3-4 years, the other day a few of my coworkers and I came to a fairly sad realization that we had forgotten some basic Java methods/functions because we always relied on our...
My t-sql teacher told us that naming our PK column "Id" is considered bad practice without any further explanations. Why is naming a table PK column "Id" is considered bad practice?
Questions like this have been asked before (like here), but a lot can change in a year. My company is very interested in migrating core systems to the "cloud". Non-technical upper-management doesn't quite know what that means, but they are excited at the idea and have already started adopting cloud-based systems. Havi...
Both Mercurial and Git were created as a replacement for the same program and to solve the same problem which you can read about in Martin Beckett's answer to How did Git and Mercurial develop so similarly at the same time? question. These two tools are very similar and borrow from each other according to Scott Chacon ...
As a software developer, I find a frequent need to create icons for my applications. Nothing has ever worked as well as IcoFX for this purpose. Unfortunately, the program is no longer free - but I still have the installer for an older version. My question is whether or not I can distribute copies of the installer. The ...
Since the .NET Framework SDK is free, is Visual Studio anything more than an IDE? If yes, do I need to buy Visual Studio to deploy my ASP.NET web application (written in C#)? I'm using MySQL for the database. I'm a student that is going to graduate college soon, and I'm exploring technologies for a web application that...
I'm a self-taught programmer, just in case this question is answered in CS 101. I've learned and used lots of languages, mostly for my own personal use, but occasionally for professional stuff. It seems that I'm always running into the same wall when I run into trouble programming. For example, I just asked a question ...
A typical stack for a web application is a database, a server with server-side code, and a user with a browser with HTML/CSS/JavaScript. Before extensive AJAX, MVC in which the controller was the server-side code rulled. A server had to route answer requests for Dynamic web pages (i.e. templated html solutions like JS...
Are there any situations where it may not be a good idea to use the code of an open source project, even if your company might allow you to do so? Some cases that I think might be valid include: The code may be implemented in a different languages. It is not portable It may need some other close-source libraries What...
I posted this question on stackoverflow and it got a poor reception. In reality, the problems I'm facing are minor and any workaround can be considered impractical. However, I believe it might be of general interest in the abstract computer science domain, so I'm giving it a go here. I'm working with Drupal's automate...
I heard this number and a quick google search reveals a whole lot of touting this number and absolutely zero data (honestly most articles promoting COBOL read like 95% propoganda). Perhaps it's true in an extremely limited context of banking software or something, but with millions of applications coded in dozens of la...
I've been programming in C++ for a few years, and I've done a school project or two in C (as well as several other languages). However, I don't know C very well at all. I have a programming interview in two days, and I just realized that this interview will be in C. How do I approach this? How do I learn C well en...
I would consider myself a 9 to 5 programmer. What I mean by this, is that I have a programming job, but after I leave work, I leave my work there and do not take it home. I very much enjoy my career choice, and I enjoy the work that I do at my current job. I also enjoy learning new things in my field, such as new te...
Possible Duplicate: How do you dive into large code bases? Sometimes before developing new products we need to understand some existing products or existing source code. Sometimes to write another small module of that big project we need to understand that big source code. In our case we need to study and understand...
My understanding is that in the 1980s, and perhaps in the 1990s too, Pascal and C were pretty much head-to-head as production languages. Is the ultimate demise of Pascal only due to Borland's neglect of Delphi? Or was there more, such as C being a more robust language? If the latter, what were the perceived advantages ...