instruction
stringlengths
34
19.9k
In situations where I need to write observer/subscriber code, how would I choose between the following approaches? A) Declaring an event that simply notifies a client something happens but requires the client to make a query for data e.g. class SoothSayer{ int DaysUntilApocalypse{get;} event EventHandler<Even...
Most programming languages support operators similar to the following 6, which are spelled here as in C. == != < <= > >= I'm aware of several terms used to include all of these operators. In approximately my perceived best-first order, these are... EDIT list fixed after Jerry Coffins answer... Relational oper...
I have some experience regarding IPhone and Android development but I am now struggling to solve a new class of problem: apps that involve a client/server chatroom feature. That is, an app when people can exchange text over the internet, and without having the app to constantly “pull” content from the server. So that p...
If so, at what stage? or it is also an iterative process? If iterative, how formal? Also, how useful is UML for a solo programmer doing open source? While I like to see a picture of the system, it feel so formal and a bunny trail for TDD. Thanks.
What do you call source code valid in several languages? There was a specific word for it and really crazy examples.
One of my roles in my team is the build person. I am responsible for maintaining/updating our build scripts and making sure we are building 'smoothly' on the continuous integration server. I usually do not mind this job, though often it feels like I am constantly babysitting the CI server. This job can be annoying at ...
Is there a line between readability vs compile or processing speed? Aside from the extreme cases, I wouldn't think it would be even worth saving that little bit extra in favor of legibility... For example; a bad idea, in my opinion would be removing all the comments on a 'finished' product to gain a little extra speed....
I am very eager to study best practices when it comes to space hardening. For instance, I've read (though I can't find the article any longer) that some core parts of the Mars rovers did not use dynamic memory allocation, in fact it was forbidden. I've also read that old fashioned core memory may be preferable in space...
So I've had a few situations now where programmers have passed the interview teams with flying colors, only to find when they arrive on scene, they demonstrate an extreme touchiness any time any criticism is leveled their way. I'm not talking about off-day irritability, but a 24/7 bruised ego thing. For certain employe...
You have an idea of a software/app/webapp/website that you would like to spend some effort and implement. Your idea uses a cloud system to keep things up and you think you could earn some money by distributing your product and charging a small one-time fee. But there is a problem: the first thing you realize is that on...
I want to know what a server does to run a php application. Below is what I think: client A types www.blahblahblah.blah/ Server resolves url and directory etc. Server go the index.php index.php has a Singleton Pattern Class in it with a static variable called instance. Now does the server allocate the memory to th...
Note on the question: this is not a duplicate, Efficient try / catch block usage? was asked after this one. The other question is the duplicate. I was wondering what was the best way to use try/catch. Is it better to limit the content of the try block to the minimum or to put everything in it? Let me explain myself wit...
I have been asked to help estimate the time it would take to develop a web application. I will not be involved in the actual programming, but I am participating as an "experienced" programmer. The actual work will probably be handed over to a consulting company, but the client (a university department) wants to have an...
We are in the middle of our first Sprint and something dawn on us: we over estimated! We had planned 114 ideal hours for this 2 weeks iteration and at the end of the first week we finished the whole Sprint. What do we do now? The "book" says we should, and we will, get the next high priority items from the backlog. Th...
Some Scrum software management tools give you this option to explicitly name your sprints. Do you have a preferred way of naming your sprints or do you just use a simple scheme like 1, 2, 3, ...?
We're designing a RESTful API to open up our customer's account information. We have representations that contain references to other resources related to the current resource. This is from a number of best practices we were able to find in public APIs as well as published materials. The representations can be either X...
We have finished our Sprint in half the expected time and now we want to compute our focus factor to use in the next Sprint. Though, by doing the math by the book, we get an awful number. How are we calculating it wrong? Please take a look bellow: Team composition: 3 Sprint length: 2 weeks Team availability: 28 da...
I understand the difference between the two, but I get questioned by my colleagues of the benefit of labeling requirements as functional or nonfunctional (or transitional). Why bother to do so? He spent what he said was two days going through a list of requirements for one project, and saw no benefit to it, because t...
I'm an undergraduate student studying computer science. I have been working at a company as a student researcher and next week I am to demo my complete project to my boss and the other developers. It is the most complex and largest program I have developed. My questions are: What is the most effective way to demo? Are ...
I'm just getting started in Android development and am working on a few small "practice" apps. As an example, one is a live wallpaper. The others are similar in terms of development effort. When these apps are done I would like to list them in the market. I may list them for free (or maybe not), and they're simple app...
I read the following question: Tips for a first year CS student looking for a summer internship to gain experience? But rather than how to get and/or look for internships, my questions concerns of how to filter companies looking for free labor to do their website VS companies that might not offer a paid check, but it w...
In a config file for a PHP project, I have some settings that should not go out in production. Can anybody offer some specific examples or help on how to automatically check these fields and make sure their values are not the development/demo settings before the files get committed into subversion? Our IDE is JetBrain...
I'm fairly new to programming (still a student), and I haven't had much experience with planning out my software development. Usually if it's a large project, the profs break it up into steps for me. If it's smaller, I usually just dive right in. This has worked so far, but I'd like a better process. I'm planning to do...
I found an easy system for uploading searchable MS Access databases to the web - it's called Caspio Online (http://www.caspio.com/). However, I would rather not pay a monthly fee just to upload databases to our website. Does anyone know of an open source alternative that will allow me to upload a MS Access 2007 Databas...
I understand that this might be a loaded question. For example, in Sql Server 2008, doing DECLARE @someNum NUMERIC(10); means that the range of the variable will be limited by 10 digits. In other languages such as C, Java, etc. the standards for representing whole and fractional numbers are different. The range of the ...
When I write high-level documentation about what an algorithm does, I use the term "array" to refer to the data structure on which the algorithm operates even though the actual data structure is an std::vector. I feel that using the term "vector" in this context does not (to me) best convey the meaning I'm after which ...
Currently I'm in the very beginnings of the planning stages of a project I was hired to take part in. It's fairly large, but small enough to be handled by 1 or 2 programmers and a handful of others (for design, marketing, etc.). Mostly the designers and marketers are working on their plans right now, but I have to star...
I've recently encountered this using TortoiseSVN, but I assume it will be the same for CVS based programs (correct me?). Out of pure curiosity, is there any reason why the CVS filesystem is case-sensitive? I.e. the following URLS are different: svn://repo/branches/PROJECT svn://repo/branches/project Is there some lega...
Is functional programming just different, or is it actually really tougher? Say someone who have never learned programming at all before, and is taught functional programming. vs someone who have never learned programming at all before, and is taught imperative programming. which will he find tougher? or the same? My q...
I have a friend who created a website with web.com which use to be called freewebs.com. He also has his domain name registered through them as well. Are theses one of those dangerous sites to stay away from or is he going to be okay for now?
I have a coworker who will likely be leaving the company soon. An msdn subscription (Premium I believe) was purchased for him - but I believe it was more than 1 year ago. Is this license transferrable to me when he leaves the company?
Obviously some old applications can't be or is extremely difficult to unit test because of the way it was written in the first place. But in places, like some helper methods which could probably be unit tested, should I bother writing unit tests for them? I mean, they could be written like a dog, but however complexly ...
So decorators wrap a base class recursively, right? And have a single super class object which is at the "core" class. Couldn't you just add an ArryList/LinkedList of decorations in the "core" class and achieve the same thing? This would avoid recursion (which is expensive), but allow the dynamic behavior of being able...
How to tackle 2-D and 3-D space in data ? lets say you are working on a power grid problem. You need to represent Towers; transmission lines; transformers and every thing else in a 2-D space. How would you design a Data Model for this 2-D space ? I can use a class tower { int x_cor; int y_cor; string power_properties...
How the encodings work? Which encodings can be used in XML? To avoid errors XML encoding while using PHP I heard about Character Encodings: Source Encodings: Target Encodings: May i know what is the Difference between them?
I'm about to start an open-source project which shall be licensed under Mozilla Public License (MPL). The problem is, I'm not sure what's this "Exhibit A" thing... Am I supposed to put that wordy "Exhibit A" in each and every source file contained in the project? And what about the MPL text proper; must I provide a com...
I am the only front-end developer in a team composed for 3 .Net devs, 1 QA and 1 PM. Although we have another team from another office halfway around the world, to whom would i do code review with? me + front end developer from another office. me + one of the .net developers in local office. other choices/course of ac...
After using mercurial daily for over a year, we are about to find a better workflow for our DVCS. Inspired by a successful Git branching model we are about to move away from our "push daily work into master repo and fork off release branches at regular intervals" workflow into "work on separate feature branches and mer...
So I have a website I would like to make that would essentially be selling files. For the sake of discussion let's say that these files are like the raw text of a book. If somebody buys a file from my site, there really isn't anything preventing them from sharing that unlimited amounts of times with their neighbor or w...
Lots of people in the open source community say they strongly consider a candidate's Github profile when hiring. I'm active on Github, with a few projects of my own and some contributions to others. But looking at my own profile as if I were an employer, I see a lot of noise: projects I cloned but never contributed to,...
We are a group that started working on a fairly big website with an existing codebase. We have a test and a production server. Our idea is to have a test repository with a number of devs having push access to; and a blessed repository that only a few can push to. The blessed repo is supposed to be always stable and re...
I read an article recently which said that mock objects are often misunderstood and misused. Are there any clear mocking anti-patterns which I can look out for?
I'm working at a company that has a strange policy. They can't stick to a single name for a software revision. For some reason they have branches, versions, releases and perhaps another term. They never explain what these mean. What is the standard way to separate out different revisions to be less confusing?
I have a problem with a senior director who doesn't understand iterative development (much less Agile). He is insistent that our software design specification (SDS) be complete before any line of code is written. Complete, to him, means all functional detail is there. Also, being a former Cobol programmer, he wants to ...
I have the impression that Delphi isn't very popular anymore. But now at work I had to make some changes to an old Delphi program that we are still using. I used Borland Developer Studio 2006 and it was very pleasant and intuitive to work with, even though I had practically no previous exposure to it. Is Delphi still w...
When creating a Security Token Service (STS) for a claims based security model, it seems appropriate that tokens are generated in such a way that they expire after some duration, as suggested here. Around this concept, I have a few specific questions, but am looking for any feedback regarding best practices in this are...
When the QA find an error like 'broken design in web programming', do you call it a bug and the corrections 'patches'? (Assume all this is before delivery.) I was of the feeling that the corrections for bugs found after delivery were called patches. Developers don't add bugs intentionally and it's QA's duty to find bug...
Ok, gang, next question: what do y'all think are the best processes to improve the quality of the code the (corporate) team produces? (The cult of quality question was good, but I'm looking for specific suggestions of things we can do.) Background: the team is diverse, in the usual way: There's the brilliant coder w...
I have come to use LINQ in my every day programming a lot. In fact, I rarely, if ever, use an explicit loop. I have, however, found that I don't use the SQL like syntax anymore. I just use the extension functions. So rather then saying: from x in y select datatransform where filter I use: x.Where(c => filter).Sele...
I am trying to write a joomla type system in PHP to improve my coding/programming skills i need guidelines/rules of thumb to do that. what i basically want to do is create a index.php file which will act as a front controller and will redirect to the request transparently to "extensions/plugins" (no need for them to fo...
I'm reading about application layers, and want to use this design in my next project (c#, .Net). Some questions: Is the separation of layers done through namespaces? Project.BLL.Whatever, Project.DAL.Whatever Is it more appropriate to separate by layers, then components (Project.BLL.Component1), or by components, th...
So I've been working at a job for the past year as a .NET developer/DBA. The job is my first DBA job. Traditionally, I'm a .NET developer and have about 5 years experience in it. Does it make sense for me to continue my certs to get the MCM (assuming I'm eligible)? I'm thinking it doesn't because I've been working w...
I'm just learning about dependency injection, and am stuck on something. Dependency Injection recommends sending dependent classes through the constructor, but I'm wondering if this is necessary for data objects. Since the Unit-Testability is one of the main benefits of DI, would a data object, that only stores data,...
Very frequently, I am stuck when choosing the best design decision. Even for small details, such as function definitions, control flow, and variable names, I spend unusually long periods perusing the benefits and trade-offs of my choices. I feel like I am losing a lot of efficiency by spending my hours on insignifican...
I'm planning on writing an open source HTML parsing library in .Net so that I have a project out in the wild when I start looking for developer jobs. Now, in my Masters program I started learning Java and found that I like it as well and was also thinking that I could also write the library in Java at the same time, to...
I have recently started my journey to learn programming, and got my self a book on Objective-C. The thing is though: I get stuck quite often, trying to figure out how to solve the different exercises. I am quite new, currently on chapter 5 and trying to figure out how to do the different exercises. I get stuck and can'...
If you deprecate something, are you guaranteeing you will get rid of it in the next major release? Is it reasonable to take two or three releases before you get rid of it completely? Update: Thanks for the answers. Java is a good standard for how to do this - any others? Any examples from Microsoft's APIs? Update...
Possible Duplicate: Frankly, do you prefer Cowboy coding? By cowboy programming, I mean a programmer just typing the code very fast without a semi-formal process. I have a programmer that codes fast by dismissing revision control, documentation, patterns, tests, and methodologies. We talked about that and she tells ...
It seems silly to compare these two servers considering that they're meant for very different things. But if you think about it, they can do lots of similar things: store configuration data, distributed locking, queueing, etc. I've got an instance of Redis that I'm using for some production-related things, but would ...
I am a front end programmer. I'm good with design, html, css, and jquery, but I want to learn javascript more than anything. I've taken a couple of courses, read books and tutorials online and feel like I have a good grasp of the core principles: variables, logic etc. This is where I see to differ from all the other "...
After yet another homework question on SO. It seems like that vast majority of students have no idea what a debugger is or how to use one. I feel that knowing how to use a debugger is almost as important as other fundamental of programming. The question is shouldn't debugging and how to use modern debugging tools ...
I'm an amateur programmer. I'd like to develop a software application (like Tradestation), to analyse real-time market data. Please teach me if the following approach is correct, ie the procedures, knowledge or software needed etc: Use a DB to read the real-time feed from data provider: what should be the right DB to ...
I started my career as a software developer about 6 months ago. This is my first job, and I am the only developer in this company. I gained .NET knowledge by self study and also by doing some university projects. Our systems have old foundations based on an earlier version of .NET, and I'm starting to feel that I am n...
Is it possible(expected) for an individual to figure out(having never seen it before) the algorithm if asked at an interview? What other problems have equally interesting solutions? Edit: Due to the confusion of the actual algorithm I am referring to, it is the Floyd's cycle-finding algorithm, aka, tortoise and hare a...
I'm involved in teaching mathematics to classes with requirements such as AS and A level Mathematics specification. Class books normally provide examples of computer software applied to mathematics tasks, but they are normally based on software applications like mathlab, mathematica or derive. Even when a real programm...
This question is about hardware and hosting, and how to "bootstrap" them. If you built a really great website, how could you have it hosted at low cost but so that it reassures customers that their data is safe and available. As an example, what if I have a web application I developed for small companies to use for the...
Many times I forget things about my application. I don't memorize the table names or what a query did and I search to get what I want. My team leader told me I'm supposed to memorize the table names that I use. Is the developer required to memorize the table names in the database, the classes names etc? And if the ans...
In the answers of What's the canonical retort to "it's open source, submit a patch"?, many people voiced the opinion that simply asking people to submit a patch is arrogant and rude. But it seems to me that as a developer on any open source project, you will see many more feature requests on the mailing list than you c...
I'm working on an investigation on the NLP field. Since software engineering and software documentation are not the primary concerns of my whole investigation I decided to do it using XP. My question is, can you recomend: Any tool you've used to manage XP projects Any recomendation/link on how to manage investigation ...
I've just been compiling some of my own code with the -std=c++0x flag in GCC, as I want to vaguely keep up with what all the young folks are doing (provided they stay of my lawn), and I ended up with a load of warnings about auto_ptr being deprecated. Of course, I knew that auto_ptr was deprecated in C++0x, but... Isn'...
I am a computer science student working on some mobile games. However, I am completely torn and keep going back and forth deciding whether to learn Windows Phone or iPhone development. I love developing for Windows Phone because C# and XNA are both great tools. However, it is unproven on the market and has a market sha...
I am trying to fork an application that is based on CodeIgniter. According to the GoogleCode page, the license is GPLv3. However, examining the license.txt file inside the root directory of the application is very clearly not GPL (it does not include the preamble etc.) and looks like a slightly modified version of the ...
I have checked pagination implementations on asp.net mvc specifically and i really feel that there is something less efficient in implementations. First of all all implementations use pagination values like below. public ActionResult MostPopulars(int pageIndex,int pageSize) { } The thing that i feel wrong is pageInde...
Can I use the new Xcode 4.2 to make apps for older version of the iOS? Will they work? I like the new features like the Storyboard and Automatic Reference Counting.
I have been noticing certain trends about writing research papers in India. They are written either by students or by academics. Do people working in day jobs (like me) in the software industry write research papers? I ask this question because, we are more likely to get interview calls from companies like Google and...
I always thought the largest scale of banks use Oracle. However, there is no proof they really use Oracle instead of Mysql or PostgreSQL, nobody knows the secret. Any idea what they really use? Can i build an ATM/Bank system where millions of transaction will happen using Mysql? Can I use PostgreSQL? Or must I use O...
How does Facebook calculate mutual friends? Does it cache all mutual friends for each user? Does it use MySQL to calculate mutual friends with a query?
I am considering going back to school for my masters and I've been looking at several avenues I can take. I've been considering either an MBA or an MSIS degree. Overall I know that an MBA is going to give me a solid skill set that can help me become an executive. However they seem to be a dime a dozen these days and...
I lived long time on static typed language world. All types were explicitly noted on each variables and arguments. Now I have to use some kind of dynamic typing language. (Smalltalk) The problem is there is no type noted on any message argument, and even on documentation. So, how can I know what should be passed to the...
I was wondering if there's a big, direct revenue in releasing a programming language such as Java or C#? Selling IDE's, licensing your brand for books or gaining enterprise prestige seem bit of a marginal benefit to my eyes compared with the effort that undoubtedly the development took (I could be wrong though, of cour...
Currently I do a lot of development on my free time to improve my productivity at work. I've got around 50 man hours of unpaid work into a few pieces of software, but I'd rather not have them end up on work computers until they're licensed to prevent redistribution without my permission. Of course, I'm not charging the...
I'm looking at UberSVN as a possible replacement to our existing source control package, VisualSVN Server. There are a lot of UI benefits for the decision, including having the integrated web UI, administration portal and collaboration features. The concern I have is what difficulties I'll face in migrating from Visual...
HTML, CSS, and JavaScript can be used to build beautiful (and useful) UI's (especially now we have HTML5 and CSS3), and lots of people already know them. Though it's still way beyond my reach, how difficult can it be to bring the whole web app thing to desktop apps? We already test apps on our local servers before host...
PNG is one of a family of container formats generally called FourCC or OSType. [A]IFF and WAV are two other common instances of the format. I want to develop a new format for a specialized data type. I modeled the format closely on PNG. PNG is unusual for the FourCC family in that each block ends with a checksum. In th...
I am building a software system for my masters project and was looking for advice on particular methodologies that would suit a "one man team"...
I'm close to the completion of a first set of features for a free application I'm developing on the Android platform and I'm starting to wonder about the best time to release it to the market. On one side I'm fond of the "ship as early as possible" model though considering that users can vote for applications I don't ...
I was absolutly sure that I need one (and some SO users too), but it turns out that my case was easily refactored with simple List<object>, and more I think about it I am no so sure anymore that one is needed and generics classes for collection managment are sufficient, I am just curious :) btw. there is a similar que...
I have a business partner who wants to do a deal where I will get a percentage of the profits from app sales. I like the deal and want to do it. In our business agreement I want to put some language that defines what happens as the project moves forward - for example, what if he wants app updates that I don't think are...
I'm finishing college for good tomorrow, then leaving my current programming job the next day. I'll be looking for opportunities, but I may end up with a month or two without a job, so with lots of free time to work on my Android development skills and improve my value for those jobs. I started thinking about what I'll...
Developing a website aiming to the Chinese market, I am wondering whether I should do compatibility tests with the 360 secure browser, which is based on the Trident layout engine (like Internet Explorer). Any developer experienced in designing websites for China? Did you test on this browser? Is it really different fro...
I'm new to web applications. I have developed a web application using ASP.net. After hearing about jquery and going through some examples, I changed the existing application and used jquery to do most of the ajax work. On the server side I used html handlers for db connections and data processing. Because I'm using jqu...
I refer to this excellent article http://www.thebuzzmedia.com/designing-a-secure-rest-api-without-oauth-authentication/ which speaks of amazon like security for web service. However I was asked a question in the team of why do we need it if we already use HTTPS. I was unable to answer as it really seems to me they may ...
I am creating a soap service where users will be able to interact with each other. They will have a contact list where people can be added. One of the security measures(others are in place, too) is to have a local ID assigned to a contact. To make the process clear, imagine the following scenario: $UserA prompts $UserB...
When working on a software project for a client, there are two ways in which this can be billed - fixed fee project, or per hour billing. Does the choice of payment terms effect the design methodology you would choose to use? For example, one of the benefits of Agile programming is that changes can be made very quickly...
Possible Duplicate: Is there a canonical book on Agile? I'm looking for a good book on learning Agile and Scrum for web application development. Can anyone suggest a good resource that guides one from the group up? We want to start implementing this into our business and web application development cycles.
I've finally begun to understand the complexity behind creating an interpreter and a compiler. I've built several versions of TinyBasic, 1964 (Dartmouth) Basic, and my own expansions on those languages before getting to this point. The most recent project is one I call Open Source Basic... because I could think of no o...
I'm just beginning to grasp the concept of factories, and want to use them in my next project (I'm using dependency injection, so using factories will make object instantiation easier). Some basic questions I have: Does it make sense to have one factory class per application layer (GUI, BLL, DAL), per class, or just o...
I work as a lone programmer on web-development projects(front and back-end) - I have completed a couple of projects, so I'm fairly new at this, I have read and tried a few approaches and reached a way of going about them. The question and my description is fairly long so please be patient. What I am looking for, is : 1...
I am now the owner of a Struts-1 application, and the Hibernate session management is all over the place. I have searched online documentation but have not found a clear explanation of the best way to manage Hibernate sessions in a Struts application. Presumably a Hibernate Session should be created (or fetched) at t...
Should we create a database structure with a minimum number of tables? Should it be designed in a way that everything stays in one place or is it okay to have more tables? Will it in anyway affect anything? I am asking this question because a friend of mine modified some database structure in mediaWiki. In the end, in...