instruction
stringlengths
34
19.9k
I know the "I" convention has been around since COM, but I've never understood why it hasn't been reconsidered like every other naming convention before .NET has. Consumption wise, the only thing that separates an interface from, say, an abstract class, is that they can be multiply inherited. But everything after Visua...
I am a developer of an open source project which is hosted in SourceForge. It started out as a little app then after some releases, it got more and more popular and it started consuming more time and responsibility from me. So I have enabled the donation option in SourceForge. I'm passionate to continue developing it f...
I'm trying to get into web development, so I started learning HTML, CSS, and javascript. I've been coming along really well with javascript, but I still can't make anything with HTML and CSS to save my life. I was going to ask for some places or tips to improve, but I know the question has been asked countless times an...
I'm trying to make a point of documenting my code better, especially when it comes to the XML comments on class members, but often it just feels silly. In the case of event handlers, the naming convention and parameters are standard and clear: /// <summary> /// Handler for myCollection's CollectionChanged Event. /// </...
A problem that I am facing and would like some input into is; a Product Owner introduces ungroomed (unfamiliar, not estimated) User Story(s) into the Sprint Planning meeting. The issue that this has caused is the team rushes to understand and estimate the User Story(s), which puts significant time pressure on the comm...
Say I'm a .NET developer and want to build my application on WinRT. What I've read is that it is a completely new API for Windows 8, strongly related to Metro-style apps. I'm assuming that I can develop for WinRT in .NET/C#? How does it relate for example to WPF or Silverlight? Does WinRT provide it's own UI framework,...
While trying to figure out how to implement a Producer/Consumer Queue in Qt, I stumpled upon several SO answers, blogs and sites linking to this site: You're doing it wrong... I got the point of this site, but people are usually referring to the code example which is in the referenced blog: Threading without the headac...
Possible Duplicate: Version control for independent developers? I work as a Junior Programmer in a team of 1. I am looking for suggestions of what open source/free Project Management(I cant remember the correct term?) programs, ie things like Github would be suitable for my & the companies needs. I create websites u...
I have a code where I have to work on Half precision floating point representation numbers. To achieve that I have created my own C++ class fp16 with all operators(arithmetic logical, relational) related to this type overloaded with my custom functions, while using a Single precision floating point number with a Half p...
While it is relatively new now (2011/09/15), are there any resources for explanations of Metro applications for Windows8? I've not seen anything at the moment that summarises an "elevator pitch" for them.
I was coding a function to remove a day from a date value in javascript and i was kind of surprise that javascript's getMonth() starts from 0 for January to 11 for December. Why javascript's getMonth() starts with 0?
At the company I work we use SVN. The SVN repository resides on the local server. When developing we commit the changes to SVN on the local server which transfers the changes via ftp to a testsite remote test server. The whole team uses the same testsite. We use a remote testserver so that we don't have to setup anyth...
Possible Duplicate: What's the history of the non-official pronunciation of SQL? I hear it every so often, "In sequel server...", and for some reason I cringe every time. Maybe it's because SQL doesn't mean sequel, it means Structured Query Language. However, I hesitate to mention anything because it is a little bit...
I've read a lot of books and articles about functional programming and still ashamed of not being able to understand for sure some very basic concepts. One of the main ideas of functional programming is that same input always should produce same output. Therefore, say, querying database or writing file could not be don...
I've decided to completely rewrite a PHP framework (Using MVC) that I've been working on, on and off, for years. My problem up until now was that I would just come up with ideas, throw them into Trac as tickets, and add them later - without worrying about the design of the framework itself. Over time this has caused so...
So I'm reading up about the differences between the old and the new APIs, and I can't find whether the new WinRT API will provide for desktop apps, so far it seems its only available to write Metro apps - ie the full screen, 'phone style' apps. Does this mean that I can write a WinRT-based app and it will be invoked f...
What is the need for garbage collection (GC) in a stack-based language? In a language like Forth or RPL (on HP calculators), is there a need for garbage collection? I would think, since output is popped off the stack, that there wouldn't be any need. Am I missing something?
To elaborate I am interested in knowing what people think you need to put in place while still a one man project (team source control, documentation, builds etc) and what things don't need to be done until that point when the second person comes onto the project. Anyone with any experience of moving through this scenar...
My research group is developing some software for research purposes. The project leader wants the software to be open source and likes the GPL, but wants to ensure that they software cannot be sold. Are we reading the GPL correctly? The software can be freely modified, (re)distributed, and sold? If so, I see why it wou...
I have read some information through internet...i found that somehow suffix tree is quite similar to suffix array but somehow they are no the same thing.. Given a string, a suffix tree construction algorithm looks something like this (I copied the algorithm from a website) FOR i ← 1 to n-1 FOR j ← 1 to i+1 ...
I going to start a new project in my company in which are involved the use of MVC 3, now this is the first time that we are using this framework, and i have a couple of questions, It's recommended to start with MVC3 and not from the MVC2? Any Tutorials in specific that you can recommend? This framework have full integ...
I am currently a software developer. As a next milestone in my career I am thinking I must establish myself as team leader which leads a small development team in order to meet deliverables, deployments, etc. I've read various post in this site itself which discusses the pros and cons of working from home. But I am not...
The descriptor 'Engine' gets thrown around a lot: graphics engine, RegEx engine, AI engine, etc. but what actually makes a piece of software an Engine? Design, Input/Output, Purpose, Size?
Just wondering why Java and .NET Framework uses different sorting algorithm by default. In Java Array.Sort() uses Merge Sort algorithm by default and as Wikipedia.com says: In Java, the Arrays.sort() methods use merge sort or a tuned quicksort depending on the datatypes and for implementation efficiency switch to ...
I have been studying design patterns and came accross the fly weight pattern. I have been trying to see opportunities to use the pattern in my applications but I am having trouble seeing how to use it. Also, what are some signs that a fly weight pattern is being used when I read other peoples code? According to the d...
Is the execution time of a unit test useful for anything? Is a unit test an appropriate place for any sort of code profiling? Why or why not? Sample Use Case: Every unit test lists name, pass/fail, and execution time. Time is also calculated per unit test class and total test suite execution time. How could I use thi...
I am developing a very simple iPhone game with this view hierarchy: Main Menu View └> New Game View | └> Player vs Computer Game View | | └> Pause View | | └> End Turn View | | └> End Game View | | | └> Player vs Player (offline) Game View | └> Pause View | ...
For websites that need to be highly scalable, such as social networks like facebook, what's the best way to design the website? Should I have a web service which the site queries to get data that it needs? or Should the site query databases directly? (can be done using built in language constructs to fill tables autom...
I have seen this question but does not answer me. It have a brand new project. I have almost always used Log4J but now I am seeing SLF4J making some waves. What is it that Log4J could not do and we needed SLF4J? Is it really an upgrade. Should I use it in a project which will also have an API for other to extend upon?
I have already done a PHP project, and I did a number of things pretty wrong :) I just had all pages as scripts with php mixed in with html. I also wasn't using a framework like cakephp. And I didn't really use objects, nor had any sort of test suite. :) This time around I want to get it right. What should I do in ter...
Several times after posting over at Stack Overflow, I have found that the problem I have is somewhat specific, and may have issues rooted elsewhere in my code. These are very difficult to solve with a question, and I often end up getting poor or irrelevant answers. When a problem is just too localized or to complex fo...
No question too stupid right :) Came across this on wikipedia The Java Persistence API replaces the persistence solution of EJB 2.0 CMP (Container Managed Persistence). My understanding was the CMP is still there i.e Pooling,Transactions etc can be done via CMP where as JPA is ORM for me. I did not think there are ...
There are numerous websites that allow users/visitors to post content (such as comments to blog posts or news). The published post can be edited by the poster, but only for some amount of time (typically in the order of minutes). After that, the "Edit" button no longer appears and the post can't be edited. My question ...
I am interested in research that detects and recover from deadlocks. In other words the system is able to recover from deadlock faults. I'm interested in shared memory multicore processors. Uptill now I have only seen research for distributed systems. Can anyone guide me on this.
I'm sure lots of developers are familiar with XML and JSON, and they've used both of them. Thus no point in explaining what they are, and what is their purpose, even in brief. If we try to map their concepts, we can say (correct me if I'm wrong): XML tags are equivalent to JSON {} XML attributes are equivalent to JSON...
Question What kind of documentation and other artifacts would you expect to get in case of taking over existing Java webapp (probably it uses JBoss Seam framework) made in-house? I would expect to get: Source code in form ready to open in specified IDE. All external elements (i.e. DB schema as SQL scripts, installatio...
I got involved in a discussion recently on how to handle refactoring in general (which is an interesting topic in itself). Eventually the following question was brought up: How does one handle merge conflicts that occured due to that someone did a refactoring of a part of the code, while someone else was working on a ...
At which point should YAGNI take precedence against good coding practices and vice versa? I'm working on a project at work and want to slowly introduce good code standards to my co-workers (currently there are none and everything is just kind of hacked together without rhyme or reason), but after creating a series of ...
I am a software professional with about 1.6 years of experience in Java. Due to personal reasons, I had to quit my job, and now after 5 to 6 months, I am about start my career again. I am planning to attempt to take the SCJP exam, but some of my seniors suggested that I should learn Spring and Hibernate. I am totally n...
I'm looking for some advice on interviewing technical candidates. I touched on this briefly in a question I previously asked: template questions in a technical interview and was informed that FizzBuzz questions are designed to weed out candidates you definitely don't want coming near your code. Moving on from that, I'...
Which Java framework meets these requirements? What set of frameworks would be best suited to meet these requirements? The requirements are: oriented for web support for transactions support for creating RESTful web services support for security, levels of security integration with some kind of ORM framework like Hibe...
After seeing this question today on variation of the FizzBuzz interview question, as well as seeing other questions related to it around, I have to ask: is there any formal research on how effective this is as an interview technique? There are plenty of folks who say that it filters out some crazy-sounding percentage o...
I know that CRM stands for Customer Relationship Management, CMS stands for Content Management System and ERP stands for Enterprise Resource Planner. I would like to know what each of things does best and which scenarios they are used in. So basic understanding of the three with differences among them and the environme...
The reason I am asking this question is I want to know how to properly call an architecture where classes have either data or logic but not both. I know this goes against object orientation and encapsulation. I want to use the proper terms for discussing this architecture. EDIT: By reading the answers I have received,...
I know design principles and design patterns in theory. But it's embarrassing to realize that it's not clear when applying it in practice. For example, let's think about simple tic tac toe console game. How would you decide what class is for certain responsibility and how do you determine that responsibility/class is n...
Why don't many code review tools seem to be syntax aware or provide more in-depth analysis of changes? Is it simply too hard to do? I find this to be a major hole of most programmer's toolkits. From what I have seen, which admittedly is not much, code review tools just compare code line-by-line with many of them not ev...
I was raised in a part of web developmentland where the creation of websites is mostly synonymous with Wordpress, FTP, Joomla, and procedural code, instead of things like TDD, A/B testing, Doctrine, and design patterns. Having not traveled this area much, I'd like to know when object relational mapping and ORM tools ar...
Did a search for Patchers and didn't find anything. But seriously Patchers: How do they work? I've done some googling, and i've gotten mixed results. I mean it seems they probably have some way of going in and changing the files (maybe comparing what is different between the files) but it seems like there is probably m...
For the sake of argument: Let's assume the application we are building is an amortization schedule. Let's also assume that the database has a table called tblAmortizationPayments that stores the information about each monthly payment in a separate row. Let's further assume that the database language can support the ...
Often it is not obvious how to implement a given design pattern in a language. Sometimes it is difficult or cumbersome. Are there any languages built to make using design patterns easy and effective?
Is it useful to learn CVS before learning SVN? Does much of that knowledge carry over to SVN or are they too different?
When I hear the term memory leak by that I mean a bug in a program that doesn't cause any problems except that it doesn't free memory resource and if it continuously does that it can eat a lot of memory, hurting system performance and in the worst case crash the program (or an other program, if the OS decides to choose...
Is there any formal work attempting to measure ease of maintenance for complex programs, comparing at the programming language level? Are there any formal measures for ease of maintenance, at any level? I'm looking for a method to obtain formal measurements of ease of maintenance (or any related work) for a pet project...
I am not sure whether it is a personal perspective or just a common feeling. I think in most cases, python's API is much more intuitive than C++ STL library APIs. If it is not a subjective judgement, could anyone explain why?
In a traditional GoF Proxy, you have an Interface, an Implementation, that implements the Interface, and a Proxy that also implements the Interface, references an instance of Implementation, and delegates the calls on the Interface methods to the same methods in the Implementation instance. Say you would call the Inter...
When I want to test something in JavaScript, I open up a new browser window (mostly Firefox) and start writing code in the provided console (mostly Firebug). However, this tends to be really tedious and slow. Is there an environment, like an IDE with self-execution capability for example, in which we can test JavaScri...
I am trying to understand the concept of using 3rd party web API. From what I understand so far, web API look like regular URLs with some parameters etc. Will the client program need to download and install any package/bundle etc from the website/server etc providing APIs and include it with their product or no bundle...
Are there any common expectations from perspective employers when they hire a Perl developer? For a student who likes Perl and Linux and would like to get a job as Perl developer, what would you recommend to learn? I am looking for things that are generic and applicable to most/all Perl positions, as opposed to specif...
I am not much of a JS developer, but I stumbled upon this site called Google Gravity (those who haven't used it, try doing a search there - you'll be amazed), which is a remastered Google homepage. From then on, I've been thinking and wondering about learning more on how the guy implemented it. I tried googling, but co...
I am tutoring a few students who are having significant trouble learning the basics of their first programming language: C++. I have known many excellent and bright students who have failed or dropped their first CS course. Everyone I am tutoring gives a similar account of his or her experience in class: the instructor...
Simple question that will help me understand my OS class... thanks! Basically, why is it unsafe to have an interrupt within an interrupt? (or exception within exception)
What are some strategies that could be used to automate the creation of unit test cases? What aspects would you need to look at in each class to be able to generate at least a decent test case skeleton? I realize a comprehensive automatic solution isn't practical, but I'd like to speed up the test creation a little at...
It's not uncommon where I'm working on a site that includes things like binary (or effectively undiffable due to factors outside my control) specification documents (e.g., PDFs, Word Documents, Excel Spreadsheets) and multimedia source files (e.g., FLA source files, Photoshop files, Illustrator files). How should these...
I'm starting a gaming project on the side of my normal school/work projects and I'm wondering if I should start planning out the user interface before starting an actual project in code. I see some pros/cons to doing both first and was wondering what advice some seasoned developers could suggest.
I want to start working on a project where I want to build a intranet website and mobile app for people working in my office for car pooling. The basic idea is that if anyone is interested in looking for someone to carpool with should make a posting of going from A to B at time X.People can then reply to it. I've narro...
Google created Google Web Toolkit (GWT) and doesn't use it when building their own web applications. Does this mean GWT is not suitable for building dynamic applications? Or have caching problems? Or have RPC problems? Or are there other concerns that prevent Google from using this technology? EDIT: I don't say here th...
I have programmed for several years. And I found it is always difficult to master an algorithm(What 'master' mean here is to understand how the algorithm works and could implement independently in some programming language). I could implement some easy algorithms(such as bubble sort, binary search, basic graph traversa...
I'm curious to know what the prevailing best practice is. Should git commits be enforced such that the project is in a working state (builds properly, all tests pass etc), or is committing broken code OK? For example, if you waive this requirement you can be more flexible with commits (use them as logical chunks, even ...
I want to manage outsourced contractors to help develop our code. The code sits on Github. I wish to use a simplified version of this branching model: http://nvie.com/posts/a-successful-git-branching-model/ For now, the code is not modular, so I cannot hide parts of it from some developers, a la https://stackoverflow.c...
I'm working on an installation script, and especially there I have many things that need to be checked and actions that only need to be performed in case of related outcomes. For example, a folder only needs to be created if it doesn't exist: MyDesktopFolderPath := AddBackslash(ExpandConstant('{commondesktop}')) + ...
I have a .NET web server application I'm building that I plan to host at a .NET cloud hosting platform, like AppHarbor with SQL server. It will be used by multiple small groups of people to record and processes votes at an election (the current system is called TallyJ). I also need my users to be able to set up a self-...
I support a VB6 application. It's currently being replaced, module by module, with .NET (including a lot of new features as we go). The GUI is in WPF, but with almost zero coupling to the business logic, so that's not as important. I'm hoping the migration will be done by mid-2012. I'm reading some of the news out o...
In a C++ book, the author says we no longer need a function with a long parameter list because most of the parameters can be refactored into state variables in a class. On the other hand, a functional programming book says state variables are evil because it causes side-effects which cause bug-prone and hard to parall...
At my company, I find that there are some days that there are very few tasks to do. I make it a point to do research to learn new things about my craft on these days. I would say that on average, I have about one day per week that there is not much to do (or some combination of time over the week). I would like to kno...
Recently I found that Netscape used quite simple algorithm to generate random number for Message Authentication Code to establish an HTTPS connection (Nestscpe used time, process identification number, and parent-process identification number). So now I wonder what source of seed do modern browsers use to guarantee tru...
Does anyone here use dbdeploy (phing) in a commands? If so - how do you manage the migrations? Let's suppose we have 2 different features developed in different branches of mercurial repository (phing build file and dbdeploy migrations are stored in mercurial). Which IDs to give to each feature changes?
Possible Duplicate: When would someone use MongoDB (or similar) over traditional RDMS? How well the SQL and NoSQL go head-to-head. I read somewhere that SQL databases are not well for data that is well structured or has some graph-iness associated with it. Is it really the case? Apart form Facebook, Google, and some...
I would like to prevent a situation where two developers refactor the same code simultaneously without talking about it first, probably using a tool of some kind, maybe an Eclipse plug-in. Can you help? We've got 4.5 million lines of code, and more than 20 teams of developers on four continents. Ideally I would like th...
I am currently playing with the idea of pitching DSCM to management in my company. We currently use the full vertical TFS stack (SCM, Bug Tracking, Project Management etc.) - however I want to specifically target the source control (as I don't think retraining QA with something like Redmine would be achievable). Probab...
I'm currently building a tool that my company intends to sell. I'm the sole developer on the project and it is being developed outside our normal code base and to a certain extent outside our normal process. I'm trying to put together a checklist of items to check before I deem the software ready to release for testing...
I would like to know about people's experience of working with APEX and the SalesForce.com platform, was it easy to work with? How similar to Java and C# is it? What did you like? What don't you like? Would you recommend it? Do you think cloud computing has a long term successful future? My reason for asking is that I...
Possible Duplicates: When is a BIG Rewrite the answer? Have you ever been involved in a BIG Rewrite? I am at a customer where I have been tasked to fix a number of issues they have in their existing systems. These systems are all quite old and was built in older technologies to really low development standards. All ...
I am developing an application that, when bought, can be activated using a license. Currently I am doing offline validation which is a bit troubling to me. I am aware there is nothing to do against cracks (i.e modified binaries), however, I am thinking to trying to discourage license-key pirating. Here is my current pl...
I have close to 3 years experience writing web applications in Java using MVC frameworks (like struts). I have never written multithreaded code till now though I have written code for major retail chains. I get a few questions on multithreading during interviews and I answer them usually (mostly simple questions). This...
I was pretty excited while creating one of my apps but as it turns out you can't actually sign up for Google Checkout if you don't live either in the USA or in the UK. And since Google Checkout is the only way Android Market will pay you, all my efforts seem to be going in vain. So because I live in India, I can't sell...
Can you recommend a design pattern/approach to exposing/tolerating/recovering from system errors, Exception handling (Java, C++, Perl, PHP)? Some errors need to be reported. Some errors can be handled internally (by a retry or are inconsequential (can be ignored). How do you structure the code to catch them? But all er...
In discussions about NoSQL vs SQL databases, I sometimes hear that companies prefer to use schemaless NoSQL databases because it is problematic to migrate the schema to a new version. But is that really a big problem when doing upgrades? Are relational databases bad for such operations? I read this blog post on the Mon...
What is the proper approach to functions that have side-effects in Delphi/Pascal? For example, I could have a boolean function DeleteFile that returns True if the file was deleted and False otherwise. How do I collect the return value? 1) The very explicit form would be: if DeleteFile(MyFilePath) then begin IsMyFile...
I recently had a negative experience, where client bailed from the bill, but my middle-man already uploaded our software and design to the clients server. Client turned out be a known criminal, and of course he changed all possible passwords of the server. However, I can still access the admin-panel of the CMS. Sadly i...
I work in an organization which creates many integrated systems products - i.e. it is complete products with mechanical/system/electronics/software being designed and manufactured. At the moment most teams are organized around projects in a cross functional way. The advantage of an organization like this is that peop...
My company is looking to develop and release an open source software project along with a proprietary enhanced version, similar to pre-4.0 VirtualBox. What is the best way to maintain the two code bases such that changes to the open source version can easily be incorporated into the commercial version with minimal ris...
When deciding what to work on for the next release, and estimating timings for each user story (and sub tasks for a given story), do you guys do this in a group or just managers? For a team size of 10, is this practical? How long does it take?
I'm starting to study a project that mainly will allows users to make payments from their iPhones or Androids. Since I don't have e-commerce experience and also I have never owned a smartphone, I ask you to give me some orientation on what is important when heading this kind of project. What is making me doubt Is it p...
An e-commerce application I used to work on used a decision tree and a rules engine for each node in order to determine if a customer qualified for certain discounts. The problem was that every promotion tree had to be evaluated, so the more promotions the client had the slower the evaluation became. This was a big p...
I have little knowledge about the subjects of compiler construction and parallel programming, so please bear with me. This is a course about compiler construction, and we are asked to learn CUDA while taking the course because the professor would like us to write a compiler for a simplified language. That compiler is s...
Has Microsoft made any indication of WinRT's current or future relationship with server development (such as ASP.NET)? While it's been made clear that WinRT is the intended future of Windows UI programming, it also includes a substantial library of common features like networking and data processing (like JSON). If the...
I work for a small product based company. We are about to re-write our existing product from scratch. We are planing to adopt Agile methodology for our development. Now my question is as we have all the requirements even before start of project (as we are re-writing the existing product), is it worth to dive into Agile...
Mike Cohn in Agile Estimating and Planning, page 154, defines a "natural order" for implementing user stories - this, according to him, is a intuitive sequence that makes sense to both developers and the team. I understand and endorse this idea. Though, I am having trouble letting go the concept of "critical path"; I s...
I'll try to keep this as much language agnostic as I can but I'll give the examples in C# since I now know how to solve it that language. The question came to mind when I was thinking of how could I instantiate many objects of the same type. Lets say I wanted to create one rectangle, I would do: Rectangle rect1 = new R...
As a developer on the Windows/.NET stack, it's pretty normal for the company-supplied machine to come with Windows (usually an ancient, archaic version like Windows XP) and a stack of software pre-installed as part of a Standard Operating Environment. In companies building software on the Java/Ruby/PHP/C stack using L...