instruction
stringlengths
34
36.1k
I use events all the time, I cheat and use autocomplete in Visual Studio. Object.closing += [tab] button. Put something in the autogenerated function. Some people like to emphasize the "routed" nature of it, and that leads me to believe I'm missing something. Is there more to it? What am I supposed to know about r...
In a typical SDLC there isn't much mention of the word production or development or the distinction between the two.These seem more of a real time , industrial driven concepts . I have come across these terms in regards describing companies. As i understand Production in Software does not necessarily mean product dev...
Now that I am using namespaces in my php files which match the file's path, I have to append a namespace to pretty much every class instantiation. The namespaces definitely help my autoloader find files, but the code is becomming harder to read/write. aren't namespaces supposed to simplify my code? why is it making thi...
The more I learn about different programming paradigms, such as functional programming, the more I begin to question the wisdom of OOP concepts like inheritance and polymorphism. I first learned about inheritance and polymorphism in school, and at the time polymorphism seemed like a wonderful way to write generic code...
Sometimes you get busy and delegate small tasks to junior programmers. But if you don't pay close enough attention you find yourself with this kind of code in production: class DivtoggleController extends Zend_Controller_Action { public function closeAction() { /* ... code removed for brevity ... */ ...
If your following the standard DVCS methodology of having a production branch and a development branch, I'm really interested in what do you do with the default (mercurial) or master (git) branch? Do you delete it (not recommended by several guides)? Do you use it as production? Do you use it as development? Or do...
How do handle developer keys that are supposed to be non human readable in your app? From twitter's developer page, under My Access Token it says: "Keep the oauth_token_secret a secret. Along with your OAuth consumer secret, these keys should never be human readable in your applications." However, the awesome twitter g...
I am trying to calculate a set of items that produce the highest damage output in a video game. There are about 50 different items, of which you can choose 6. There are all sorts of conditions that each item creates. I am writing a small app in javascript that calculates your damage based on the items. Could I utilize ...
I work for an IT company that is primarily services (project) based rather than product based. All software engineers are salaried. The company has set new expectations that everyone should work 48 hours per week instead of 40. Note, this isn't occasional overtime due to crunches. This is the new 40. The reasoning is ...
I wanted to know how well people generally define a software product before actually beginning to code and how well it has worked for them? I am referring to defining use cases, analyzing risk, drawing class diagrams, etc. I know that it is a good idea to have a good enough idea of what the final product will be to be ...
If a project was coded without much (or any) formal documentation and is without unit tests, does it make any sense to use tools like Fitnesse and SpecFlow to write automated acceptance tests as the documentation, the specs, for the code? To use unit tests as the means of being specs would come at too high a cost. I'm...
I am looking for some insight from you smart people on SO. I'm a relatively new developer (3+ years of experience) primarily on the .NET framework, and I'm absolutely terrible at knowing how to properly estimate even the smallest of projects. I know that it's going to be a pretty big hindrance to my upward mobility a...
Is there any benefit in getting a CS degree in ones mid 40's career wise? Would the increased likelihood of getting past the HR filter be worth it? It's something I might actually enjoy doing, and I wouldn't mind solidifying my fundamentals, but I would be reducing my earning capacity during the years it would take...
BACKGROUND: I develop custom WordPress plugins for my clients that they then distribute via the WordPress plugin repository. I'm increasingly running into clients who want my WordPress plugins to consume SOAP web services developed by their internal development teams (and as an aside, thus far every one of these SOAP w...
Is it true that a person with fairly good fundamentals in programming can easily learn any programming language? Well, when I say programming languages, I refer to the agile and dynamic languages like PHP, Perl, Ruby, etc but not the former programming languages of the distant past. I've worked only on java, groovy and...
Here is the context. The apps will: consume existing (and standard) web services. app is UI intensive (UI updated frequently and lot of data to display). development team experience level is average. development team has very few experiences in silverlight & WPF. I want it simple, but I want to avoid a complete rewrit...
We have a web application which is developed in classic ASP and it evolved over 5 years to its current form which has 100's of pages, huge database and more than 10000 active users going through at least more than 10 pages daily. Now, we wanted to upgrade it to latest version of .net. Initially we thought rewriting the...
Since starting developing ASP.NET projects I find myself familiar just touching F5 for debugging. I think most of us are learned that way? From then and much later I learned to live with the spooky port number dedication, xx multiple instances of WebDevXX.exe in my notification bar and the relatively slow loading time....
With all the new "modern" languages out today, how is it that C is still heralded as the fastest and "closest to the machine"? I don't really believe in there ever being only one correct way to do things, and C has been around for a really long time (since the 60's!). Have we really not come up with anything better tha...
When writing a software architecture document, should we present the technology used and how it connects to the system qualities we want achieve? For example, we chose .NET because arg1, arg2 .. My feeling is NO, architecture should be stable in change; but the concrete realization of some modules can change in respec...
When designing Many-to-Many relationship on a database, we need to put another table in the middle so it become 3 tables with 1-to-many relationship. Wikipedia told me that it's called associative entity I always have problem naming these kind of tables. Is there any convention for them? or how do you name these tables...
Years passed since Scrum had been widely adopted in software world. I’m wondering if there is any efficiency survey done by more or less independent people/institutes. Obviously scrums gurus who travel around the globe giving lectures and training always find numbers of excellent showcases, however I’d rather listen so...
A client I did a project for accidentally ended up with the source code of said project. Stupid i know. The arrangement was that they would get the product, never the source code. However, obviously, they are now trying to pull a fast one and use the source code to create their own products for other clients. Now i don...
In my JSP web application, I want to redirect sample users to a different page from the real users. Currently we do something like if((user.getName().equalsIgnoreCase("Sample")) ... This is (a) hardcoded and (b) executed for each normal user as well. Is there a better way to handle this logic? I am loathe to redirect ...
I've started writing a framework in C (you may have heard of it: Raphters). Someone contacted me to ask whether I could re-license it because it would be useful in embedded products, but clause 4d (the clause that says, and I'm paraphrasing, you must allow modified versions of the library to be re-linked against your e...
I just read hibernate reference and they say that you should use constans for HQL queries. However that is not always possible, for example if you do search function and have 10 criterias (not jpa criterias, just columns you are searching by). I bet you can do some hacky HQL that is transformed into badly performing SQ...
My question is simple. I'm a developer and work with another developer who's been here for many more years than I have. He has his opinion about implementing stuff; he's more of a do it yourself kind of person. I'm more of a let's not re-invent the wheel kind of person. Recently for example we had a big discussion abou...
In a standard ICT Department who is responsible for managing software licenses? I would start by saying that the ICT Manager is accountable for it. But who gets the responsibility, using ITIL as a standard model for an ICT department would the Service Delivery Manager or Development Manager? The Service Delivery Manag...
A client of mine is using TFS and asks people to operate in this manner: The developer in India writes the first draft of code The code is published to a workspace (eg 10.1.1.1\TFSName Project:FromIndia Folder:\My.Assembly.Name) The code is reviewed by an internal employee To help ensure a full comprehension of code,...
I'm considering migrating a 14 year old cvs repository (history intact) to mercurial. I think I've got all the technical conversion bits down, but I still have some questions about working effectively in mercurial. One of the things I see a lot in individual developers' cvs sandboxes (including my own) is local uncommi...
My understanding is that Google is not using MapReduce for Google Instant, but I can't find anywhere that states what they're using as the datastore for Google Instant. What is the datastore used by Google for Google Instant?
This question arises from seeing code where I feel like something is wrong but I can't put my finger on it while developing Android. What are some red flags in Android development that says your application just may not be organized/programmed in the best way? What are some ways to fix these instances of code smell?
Is there a name for a Java Webapp's war that includes the source code? We will be using a webserver that accepts Java Web Projects with source code) uploaded into the docroot folder, so docroot/admin.webapp.zip would be the place to upload a webapp that handles http://example.com/admin. This way the compiled binaries a...
For both PHP and ASP.NET, which reporting tool you prefer to create, preview and print reports? Not just printing the web-page directly, any professional third-party or an open-source tool.
I have /src/main/ with all my code (i also have /src/online, /src/prvlibs, /src/test, etc) but now i am thinking about moving a few non active projects out of the folder. Sure i could go in and delete all objs, (some) project files, etc so it doesnt take 200mb of generated data. But i think it might be nice for only 20...
I have found this article in several posts on SO. I find myself falling into the 6th archetype; the "Theoretician". It defines the "Theoretician" as: The Theoretician knows everything there is to know about programming. He or she can spend four hours lecturing about the history of an obscure programming language or pr...
I've been attempting to learn C#.NET for the past month or so, and the array of ideas that seems to always trip me up is encapsulation. As this is one of the three pillars of OOP, I feel that I am operating at a loss for not understanding their use and implementations more clearly. When learning, though, it is often us...
I have question about using .Net 3.5 or 4.0 I know that .Net is more productive then Qt but i am afraid of problems when my client leave my product because he cant run e.g demo of my app with lack of appropriate framework version. I wish to ask experienced persons in that matter. Is that many users that doesn't have ....
After being exposed to numerous database abstraction layers, I'm starting to wonder what the point is of every library inventing their own different paradigm to access data. Picking up a new DAL feels like learning a new language all over again, when usually all I want to do is just convince the layer to output an SQL ...
Programmers, like myself, often is too worried about if their code is really going to work, rather than how to communicate with the users. Scared of throwing an exception at the user, we test with different scenarios in different environment like development, staging and production. But when it comes to deliver a simp...
Based on this question. Would you consider it best practice to create a function that does the opposite of an existing function just to give it a different name. Example: If you already have bool In(string input,string[] set) which returns true if the the array set contains the string input and false otherwise, shoul...
It's part of my job to interview new candidates and I came up with a test that pretty much measure the coding skills of the candidates. However I couldn't (yet) come up with a good question to measure the candidate's capacity to deal with abstraction. Earlier I had the following question in my test: Suppose a tree str...
The danger of ever suggesting some feature on a product, especially open source, is that you'll get the response, "why don't you do it?". That's valid, and it's cool that you can make the change yourself. But we know practically that products do often improve as programmers listen to the voice of users — even if those ...
I have a few friends who are small business owners (~100 employees) and I've had good luck turning their Excel spreadsheets and the like into actual applications. It works great for them and is rewarding for me. You guys might laugh, but you'd be surprised the money and personnel time it saves them. The work isn't com...
This is a philosophical question. Given a hypothetical desktop application, and a desire to provide automatic updates (rather than forcing people to go to a website, check for an update, download an update, install), which of the two is more of a "best practice" approach? Like iTunes, it checks to see if there is a ne...
Often one of the biggest problem areas for me when developing software (win and web) is some of the more (seemingly) abstract areas like tcp/ip, deploying to IIS and the various configurations, etc. This especially pops up when I am deploying a web app to IIS. What should I know about this so that I can troubleshoot pr...
I have an authentication system(ASP.Net library) that I want to make sure is secure. What companies/resources can I use to make sure of this? Also, what should I make sure to do before sending it off to be "broken"? A bit more background: Basically, I'm wanting to make a little bit of money by selling this system, but...
I'm a CS student currently in the process of looking for summer internships, specifically because I want to develop apps for Android and/or iOS. When looking over requirements for various opportunities (any software development opportunities, not just those I singled out) it'll list "Experience with x, y, z....". My ...
Which project management and software development methodology is best suited for iPhone Development? Are there any documentation templates available which documents an iPhone Development project?
I've inherited a project that's accrued, layer upon layer, like a pearl over the last six years. It started out as a web page to let the client check the status of their work in production, and has become a full-fledged shopping cart system with a variety of domain-specific features, which involve visualizing custom g...
Some customers use terms from the domain language interchangably and incorrectly. This has, on several occassions, lead to an implementation of a feature in a way that was not desired by the customer. Are there any techniques that can be used to enforce the correct use of terms? Are there any techniques that can be use...
I have seen some dirty code in my time. I have heard varied feedback about "dirty fixes" too: a) a dirty "fix" is not a fix b) some fixes dirtier than others but dirty fixes are not acceptable c) some fixes dirtier than others and some dirty fixes are more acceptable than others d) dirty fixes show a pra...
Just started working as system developer and dislikes the labeling of a home made exception: HumanErrorException. In my view, there is no such thing as a human error in a computer based system - just users who don't do as developer expected. So the real label for the exception would be DeveloperNotTakingUserBehaviourSe...
I am trying to understand C++ friend. When is the good use case to use friend? I suppose if we want to let another class have access to another classes attributes, why don't we just make it as public or inherit from that class instead? Thank you for your help.
We have different ways to store program data (save files in games, employee databases, program configuration etc.): Plain text (think .ini and .conf) XML Databases (MySQL, SQLite...) .zip and similar containing several files (with different formats) Binary files (think .doc etc., for instance created by a serializatio...
It is sometimes necessary to try/catch exceptions inside the "if" condition, but not the body that follows. In C#, this is really rather cumbersome, requiring locals and code that isn't entirely obvious, at a glance, as to its operation. It is also sometimes necessary to write "switch" statements, which, unlike "if", h...
I've just recently installed mercurial, and have been playing around it with. Overall, it seems like a great way to do version control. However, the distributed nature of its architecture makes it so flexible, I'm not really sure what the ideal configuration/topology is. I'm well aware that asking something like "wha...
Just like in the closing credits of movies, some software vendors list the full names of the team that worked on the piece of software you are using. They are usually displayed in the splash screen (Photoshop) ... or in the about box (Traktor). In the demoscene, it is a mandatory practice, like in the movie industry....
This is not a "classic" programming question, but it's related to our job. I develop and sell data driven web app for some customer, some small (10 employess or less), some bigger (1000-2000 employers). My questions are: Can i sell my app with different prices, based on customer's "dimension" ? Is it common in "softw...
HTML <table border="1" width="400"> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </table> XAML <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Au...
Last time I checked C# was loved by many because it's a statically typed language but the introduction of ViewBag in ASP.NET MVC 3 brings the same problem that is there with strings: in a controller you type one thing and in the view you can by mistake type something else. What's the reason for making ViewBag dynamic? ...
I had thought that this was one of the few solved problems in C# coding standards / style; Attributes always appear on the line above the thing to which they are applied a la [SomeClassAttribute] class SomeClass { [SomeFieldAttribute] bool someField; [SomeEnumAttribute] SomeEnum { SomeValue } ...
In my projects I use quite a lot of static classes. These are usually classes that naturally seem to fit into a single-instance type of thing. Many times I use static classes and recently I've started using some singletons. How many of these does it take to become a code smell? For instance, in my recent project which ...
In hiring programmers, a common test is the Fizz Buzz test. What are some neat/interesting variations on fizz buzz which keep with about the same difficulty level? Basically, if I asked someone to do a fizz buzz test over email or something, I'd want to make sure they can't just google the code.
When I use jquery library I notice that the code will continue execution regardless the previous line complete the execution. More precisely while using jquery ajax, it will continue execution without waiting for the ajax result. Is this because javascript takes advantage of parallel processing? Or to which category th...
Can escaping functions (e.g. mysql_real_esacpe_string ) be moved down to the database layer where we would loop through all parameters passed for all queries and escape all strings. Would that be a good design?
There's a widespread belief among programmers that the more dynamic and loosely typed the language, the more productive the programmer will be in it. Guido van Rossum wrote about programming productivity using python in 1998 and searching around the web I still see people referencing this exact claim: Syntactically, P...
In my experience before you start working for a company you have no opportunity to look at the code-base (I've asked and for reasons of confidentiality everyone has always said no, I think that is fair), so during the interview process what do you think are the most important questions to ask to find out what kind of s...
in unix, i want to modify enviroment variables. if size of new value is larger than the old one, the room for the new variable is allocated by malloc. however, is memory for enviroment variables above the stack? (not heap memory) where to allocate the room for new variable?
I'm quite new to Android development. I spent a few weeks, doing tutorials and developping simple apps. Now, I'm focusing on all the test aspects. I have done Junit tests before so I thought it would be OK but now I'm slightly worried about the test coverage required. First, how to test with hardware with that many dif...
I have been writing code so far in conventional text editors that come with the OS so far or use an IDE in some cases. I know there are some advanced text editors like Emacs and Vim available solely for the purpose of coders. How important are they really? Should a programmer dealing with PHP, Python etc. learn these e...
I'm having a asp.net website running live with its specific style and specific content. From that site we've built another site with the same logic (in other projects) but with different style and different content (and different files) in the same solution. We've changed the start options from Default.aspx to the root...
What exactly is an algorithm, as in what does Algorithm mean? The little I understand the word, is that it's not specific to a particular language, or design pattern, rather it's one the most basic principles (so I guess this question makes me look stupid). One of the "options" I have of understanding it, is that it me...
Which license would fit the following requirements the most? Everyone is welcome to make updates and use the source code But nobody should sell it or sell an application that is using it, unless they make a deal with owners
Could you recommend some good reading materials related to JAIN SLEE? Or Java in Telecommunications in general.
My web application is currently written in JSP/Java, using an Oracle DB. I develop on Windows, and I use JDeveloper (Oracle's eclipse clone) and I use JDev's integrated WebLogic Server. I want to go live using a respectable Web hosting company. LAMP devs get all the girls, I'm stuck using WWOJ (Windows Weblogic Oracl...
I recently found the need to do recurrent billing. I am extremely averse to storing people's credit card information and I refuse to take risks in that area. I am stuck between a rock and a hard place, however. Using a gateway in my local area and currency is prohibitively expensive. Basically, as things stand, we can'...
I'm learning git and I've noticed that it has a two-step commit process: git add <files> git commit The first step places revisions into what's called a "staging area" or "index". What I'm interested in is why this design decision is made, and what its benefits are? Also, as a git user do you do this or just use git ...
I read an interesting article, 10 reasons for quitting IT. I quote a part of this text: "This misunderstanding of both duty and technology does one thing: It makes your job impossible. When the powers-that-be begin to micromanage your department for you, every single bad element is exacerbated. You know yo...
I know with changing the variable type, the speed of the program change. I want to understand the other effects of this change in the software performance. I want to know if we use a floating point variable instead of fixed point variable,the amount of memory consumption and speed of program, what will change?
Say I've received the specifications for a project from a client, and now its time to start developing it. Normally, I just start with the first module (usually user registration) and then go from one module to the next. I only plan in my head just before I'm about to start on a module how its going to work, but there'...
I have a Web App that i have developed I am looking to develop a plugin for this app so that i can pull information from the users accounts package such as sage or quickbooks(offline version). Ideally I would like to do this without them having to have a static ip etc. Unfortunately this is way over my head I currently...
I am interested in starting to learn how to contribute to open source projects and Linux in general. I am a first year B.Sc. Computer Science student this year and we use c++ as our main programming language. Where can I learn how a typical GPL application should be structured? By this I mean the layout of the source ...
I'm planning to develop a program which I intend to sell later. I'm trying to decide upon a language to code it with, and have narrowed down to C++ or Java. I've been through the GPL v2 and v3 licenses used for GNU's GCC and OpenJDK (yes, I can understand some amount of legal stuff, but clearly, not all of it). But th...
I am working on an application for which a rich plugin API is crucial. What is the best process for creating an API that is intuitive and easy to learn?
The general idea that is espoused by most Agile / XP theorists seems to be that pairs should swap regularly. For example each programmer should swap pairs once per day; half the people swap at the start of the day, half the people swap after lunch: due to external factors such as meetings, holidays and the like most pe...
I know, and use, two version control systems: Subversion and git. Subversion, as of now, gets used for personal projects where I am the only developer and git gets used for open source projects and projects where I believe others will also work on the project. This is mostly because of git's amazing forking and merging...
I'll start by saying that I've done 95% of my database work using SQL. Recently, I did some investigation of various ORMs, such as NHibernate and Doctrine. I can see the advantages of not needing to know much SQL and the database portability that an ORM provides. But I can also see that knowing SQL will make working ...
The applications that I develop on my free time are getting bigger and I'm planning to launch some other projects that I'm currently developing, so I want to know how to choose the correct license for freeware and open source projects for this and some of my future projects.
I've been working with a friend on a project that we've taken over, and I've realized that we have a big problem implementing the model-view-controller design pattern due to the way that the project has been set up. The project is currently split up into the following three sections (.proj files in Visual Studio): Mod...
I recently used a government service that I had an account for from years ago. I couldn't remember my password for the service so I used the "forgot password" link and was astonished to see that this government website sent my password to my email address in plain text. I'm personally aware of how to handle user passwo...
There is a fairly helpful question already along these lines ("Non-OOP Design Patterns?"), but I am more curious about a transitional point of view for someone just getting started with dynamic and weakly-typed languages. That is: let's say I've been programming in C++, C#, or Java for many years, and absorbed lots of ...
From what I can understand, C# is the defacto language when coding .NET apps. Is it recommendable to program .NET apps [let that be ASP.NET, WinPhone 7, GUI, etc] in C++? What are the pitfalls and the drawbacks if we choose to go down this path? Thanks for sharing.
Can somebody explain the obsession with patterns and anti-patterns in programming? I ask because I have absolutely no idea what any of the patterns mean. When faced with a programming task I think about the problem for a little bit, write down some data structures that I think will be relevant, prototype a solution, se...
The Wikipedia article for domain-specific languages seems only to refer to actual languages. However, I've heard the term "DSL" used to refer to unique-looking coding paradigms encouraged by libraries in "standard" languages. From Ruby on Rails, for example (from here): create_table :posts do |t| t.string :name t.s...
I like the way planning poker works at the beginning of any project, letting you compare and discuss details of each story with one another. One of the issues I've noticed with this is that through time and as you gain more experience with the problem domain, you tend to vote less points for each story, i. e., a story ...
When it comes to naming your software product (whether an application or a library), what do you do? It seems impossible to choose a name which isn't already taken by some other piece of software, whether it's someone's small hobby project or a company selling it. We all know about Phoenix becoming Firebird becoming F...
I am planning to start a website. I am not good at designing. I am planning to outsource the designing part. How should I do it? Should I program first and then ask the designers to work on it? Or should I get a design from them and then work on it? What do you prefer?
I've recently went through manually editing some tables on a Wordpress website. I've also had some experience with database internationalization so I know that serializing is not the best (IMO) option to apply multiple languages. So why is it done?
Years ago I developed a website in Flash for one of my clients. I was in charge of code/animation and also maintaining Hosting and Domain. I also have a basic contract with my client and in the contract it does not mention who is the owner for the code. My Client (ex client) decided suddenly to work with a different co...