instruction
stringlengths
34
36.1k
We are in the process of building a web application for a client and they have inquired about owning the code for the site. We would like to issue a license agreement to the client for use of the code if we for any reason we are no longer working on the project. We would like to have ownership of the code but allow t...
Here is a little background information. I have been working for Java 10 years. The product I am working on went to live about 3 years ago. Now, the product is getting stable. After all the post-product drama, I gained a lot of knowledge about Oracle & SQL. People(mainly management) were desperated enough to give me d...
I have an abstract class that will have many implementors. There are, of course, many places to put abstract classes in a Java package structure. Should the abstract class be in the same package as the implementors, or should it be in an "abstract package" package, or somewhere else? Please explain why you would place ...
The first abuse that comes to my mind in C is: #define if while But at the same time it is extremely handy and powerful when used correctly. Something similar happens with Common Lisp macros. Why doesn't all the programming languages support macros like this and what are the alternatives? Is it they are considere...
I recently worked on a prototype of a new system using Sketchflow, and now some key stakeholders are pushing for a sketched look & feel in the final product. To make matters worse, the people viewing the prototype were asked to provide feedback on the sketched look & feel by way of a fairly leading survey question, to ...
We are being forced to use Spartan programming on a project, to everybody's dismay. So I get it, it makes the methods really short and it handles the simple cases first. But is it really worth the price of the code looking like something out of the Obfuscated C Code contest? Can you see it being useful for something? ...
How many key bindings are there in your brain? I personally use Intellij Idea as my primary IDE for development, but sometimes switch to Eclipse and Netbeans a bit, and sometimes I use Jedit,Notepad++, Emacs, Vim. I am always trying to find a perfect key bindings that I can use crossing all the editors. What's your ide...
When is something language agnostic? Why is it called that?
At the moment we have: Iphone Android J2me touch J2me non-touch J2me touch for Blackberry J2me non-touch for Blackberry We were thinking of making another J2me non-touch for crappy devices (because the regular non-touch is just to heavy) The question is, can you think of any other versions of our application that w...
What do you do to understand some code that you didn't write? Or code that you wrote long time ago and don't remember what it does anymore. Do you have some technique that you go about? Do you analyze the structures first, or the public methods, or do you draw flow charts, etc.? Or do you fire up the debugger and just ...
How do you evaluate how much you feel you ought to be paid as a junior programmer?
My team recently inherited a project from a team where the amount of developers dropped so low they had to offload some work. One of the projects we inherited was a project littered with nested code, and awful exception handling (Exceptions were in effect handled as goto statements and thus used as a part of the normal...
Exhibit 1, Exhibit 2, I guess you won't find it hard to recall other examples. Thing is: if there is more than one way to solve a problem, the PHP programmer (I usually browse the PHP tag on StackOverflow) will ask for help on the solution involving regular expressions. Even when it will be less economic, even when the...
I was reading about the js-test-driver unit-testing framework, when I found out that the guys behind the framework intend it to be integrated with an assertion framework. What is an assertion framework? Is it a kind of unit-testing framework? If it is the case what is specific to such frameworks?
I decided to learn programming. I've been reading SO for few days, and I think I will start with C++, as I read some articles. I am aware of loops, arrays, program logic and objects a little and I need someone to look me over and help me with small questions I get when doing my first projects. So here is the question ...
So, there are a bunch of questions appearing asking is X evil, is Y evil. My view is that there are no language constructs, algorithms or whatever which are evil, just ones which are badly used. Hell, if you look hard enough there are even valid uses of goto. So does absolute evil, that is something which is utterly i...
I have an application at work, which I started work on about 7 years ago. This was my first engagement in ASP.NET web applications, and coming from a Win32 background I had a hard time adjusting. All this time, both the project and myself have "matured" and now most parts of it are well defined, properly structured an...
Some programming languages (e.g. Java and C++) have language features called "packages" or "namespaces". How useful is it really to have namespaces? It is possible to mark functions and classes as belonging to some particular library without using such a language feature, like the SDL does (e.g. SDL_BlitSurface()). ...
I have a personal project that I'm working on although it's quite audio and graphic-intense and I was wondering if you guys had any suggestions or solutions as to how one could keep the size and memory-usage of their application to a minimum? My application is an iPhone application and, as Apple always make clear, the ...
I have a library for R (open source statistics package) mapped out on paper. I have started coding the different functions but I realize that I don't have the time needed to finish this in a reasonable amount of time. I know I can just throw the code up on a repo and call for others to help fill in the blanks. But I'd ...
I'm currently studying Latin at school, and what I've learned is that it's a very logical language. I feel this has contributed to my programming ability, as it makes it my code easier to understand. Is there any relation between knowledge of a very logical language such as Latin and the comprehension of code?
I am coding a PHP serial access class and have been taking pointers from the PHP-serial class on Google Code (here). That class is based on PHP 4 and I'm creating a PHP 5 class that allows more functionality and is specific to some business demands I have. There is no code copied and I have done all the coding. Doe...
First off, I want to say that this is purely hypothetical; it's just a scenario that came to mind. I am not looking for personal legal advice, but rather, I'm trying to gain a better understanding of software licensing in general. Suppose somebody open-sources code relating to a botnet (either the code to infect a zomb...
Implementing threading in a program is hard, yes, however why is it that some people will not implement them even when there is an obvious need for it. An example: Program has to load a dataset from a database, the thing to do would be to make the connection and get the data from the database in a worker thread and the...
Several organisations I know use SMART goals for their programmers. SMART is an acronym for Specific, Measurable, Achievable, Relevant and Time-Bound. They are fairly common in large corporations. My own prior experience with SMART goals has not been all that positive. Have other programmers found them an effective wa...
In ancient history, Brendan Eich had a language design, and in today's world, JavaScript is a popular language implemented and used in many different places. What caused the language to become popular? Was it the C-like syntax familiar to previous programmers? Did Netscape have enough control of the market to force it ...
I'm studying Haskell for the purpose of understanding functional programming, with the expectation that I'll apply the insight that I gain in other languages (Groovy, Python, JavaScript mainly.) I choose Haskell because I had the impression that it is very purely functional, and wouldn't allow for any reliance on state...
Based on the "featured apps" section of the main page http://www.emotiv.com/index.php Alot of the so called "mind control" apps so far seem to be fairly rudimentary read/scan apps that look to profile a certain activity, or perhaps allow the user to manipulate or control an app in a way loosely analogous to using a mou...
I am a PHP developer with ~3 years experience. I want to get deeper into PHP and really understand more low level constructs/functionality. I have mainly done frontend web dev and a little php cron jobs. I want to learn more about stream contexts, closures, process forking, etc. The book I've found that seems clos...
I've ran into several oddities using javascripts floating point arithmetic, but I can never recall them off the top of my head! What are some common mistakes when using JavaScript to do math?
I'm developing an application for Android/Java. This application is a kind of password manager, so I'm storing encrypted passwords under the hood of a master password. There are a number of encryption algorythms DES/AES/BlowFish/TwoFish and so on. My intention is to develop application which is free of commercial copyr...
Can PHP/mySQL handle 1,000,000 unique users onlinie at the same time? Or should we use a more powerful system like Zend? Or does it depend more on the web hosting systems like load balancing, etc?
We produce a number of analysis tools which we re-brand and customise for other businesses to include in their websites. The tools are typically product comparison, data/trend analysis and report production (in a very particular sector). At present these tools run as a single instance in house, our clients redirect the...
I am working on a project with a team of 4-5 people. Is it necessary to discuss the database changes with the team before implementing? I am working on the database api's. Is it better to discuss this or not? In my team are senior people. So can't I make changes myself and implement the change and explain the changes....
Following on from this question, I wondered if folk might be able to suggest some samples of what might be considered a "good" objective in a periodic review cycle for a programmer? Let's define SMART from the most popular definitions in the Wikipedia entry: Specific Measurable Attainable Relevant Time-bound
Can somebody please tell me in simple words what exactly is ant build file and maven build file?
Yes yes, I am aware that '\n' writes a newline in UNIX while for Windows there is the two character sequence: '\r\n'. All this is very nice in theory, but my question is why? Why the carriage return character is extra in Windows? If UNIX can do it in \n why does it take Windows two characters to do this? I am reading ...
As a Linux (server side) developer, I don't know where and why should I use C++. When I'm going for performance, the first and last choice is C. When "performance" isn't the main issue, programming languages like Perl and Python would be good choices. Almost all open source applications I know in this area have been wr...
I do mainly .NET work so I assume that the framework is all fine and that. But have there been reports of various tools like .NET Reflector and the like not working properly with Win 7? This is a company-wide thing so there isn't much I can do about it, but once everything is reinstalled I'm hoping to not find anythi...
I've developed some software within my company and we have agreed that the future of the work is to open source it into the public domain. Is there an official contact procedure to contact the Apache Software Foundation, apache.org, to propose a new project? Looking at apache.org I've not been able to find a contact em...
I'm primarily an ASP.NET developer and the single thing i've been introduced to in recent years that has had the most dramatic impact on the quality of the code I write has learning how to use IoC containers to manage dependencies between different layers of the application efficiently. I've recently made it my hobby ...
So as both a full-time programmer and hobbyist as well (developing my own things for personal use and maybe to sell one day), I feel that me purchasing a big white board to hang in my room at home or something would be very useful. Does anyone here have one as well, to use for high level designs (UML, Architecture, etc...
I have seen some programmers tweaking their code over and over again not only to make it 'work good', but also to make it 'look good'. IMO, 'clean code' is actually a compliment indicating your code is elegant, perfectly understandable and maintainable. And the difference comes out when you have to choose between an ae...
So, we've all heard of The Programmers Bill of Rights and XP has a similar concept. It's a common complaint these days that we hear a lot about people's rights but not so much about their responsibilities, so what should be on the programmers bill of responsibilities. That is things that they should do, which they may...
What principles does your software engineering or development organization follow? I am very interested in seeing a list of principles from someone who works at a company where these principles are discussed, published, followed, etc. The closest I have seen to a principles-based engineering organization are companies ...
Especially when writing new code from scratch in C, I find myself writing code for hours, even days without running the compiler for anything but an occasional syntax check. I tend to write bigger chunks of code carefully and test thoroughly only when I'm convinced that the code does what it's supposed to do by analysi...
There's been a lot of enthusiasm about JRuby, Jython, Groovy, and now Scala and Clojure as the language to be the successor to Java on the JVM. But currently only Groovy and Scala are in the TIOBE top 100, and none are in the top 50. Is there any reason to think that any of this bunch will ever gain significant adopti...
Quick question about TFS - Do you guys check-in bin/debug folders into TFS? (if so, why?) Since the content of those folders are dynamically generated is it better to leave them out so that the programmer will not run into read-only issues?
Is coding important to be good at computer science? Should one implement the algorithm to know it well ? I remember one cs professor's idiom that "I never code"
Why ISO/ANSI didn't standardize C++ at the binary level? There are many portability issues with C++, which is only because of lack of it's standardization at the binary level. Don Box writes, (quoting from his book Essential COM, chapter COM As A Better C++) C++ and Portability Once the decision is made to distri...
This reply to the question "I don't know C. And why should I learn it?" has me interested in learning C. What is a good self-instruction program (textbook/website/OpenCourseWare, etc.) for someone who already has lots of experience in high-level languages?
At work, we've been doing lunchtime book clubs for a while. So far we've done: Clean Code Working Effectively with Legacy Code The Pragmatic Programmer We read a chapter per week, and one person is assigned to present over the content and help facilitate discussion. Of the three, we've probably had the most success ...
If you have a product that has been in the market for a long time, but it is still in active development daily - how often should the manuals be updated? If your users are constantly updated to the bleeding edge version due to the fact that your organization sees fit that the latest bug fixes are always in the shipped ...
Is there any just-in-time compiler out there for compiled languages, such as C and C++? (The first names that come to mind are Clang and LLVM! But I don't think they currently support it.) Explanation: I think the software could benefit from runtime profiling feedback and aggressively optimized recompilation of hotspot...
I'm just wondering about the future of it all. IMHO, there are 4 forces that define where technology goes: Microsoft, Apple, Google, Adobe. It looks like in Apple's iPhone/iPad iADs can now be programmed in HTML5. So does that mean HTML5 will eventually replace objective-c? Also, Microsoft has now shifted it's focus f...
For your proprietary projects at work? Problems I can imagine are: more dlls (can be a problem when for example you have to include a big DLL but you only need few functions in that library), a lot of license statements you have to take care of when releasing your product, the reliability of the library, etc. Any other...
Possible Duplicate: What should a developer know before building a public web site? I gotten interested in web-development lately. I am still a student. I learnt basics of HTML, CSS and JavaScript. Then I thought I should improve my server side scripting. So I am learning Struts2 and I am doing better there. Now I h...
I have a User class which needs to load data from a variety of sources, e.g. the main user database, WordPress user metadata, authorizations from another app, etc. For the sake of organization, I want to separate out those different data loaders into their own classes. Calls to $user->get_name() would appropriately del...
In the answer for one question someone wrote that assembly is not a language, it's a process. I tend to agree, since the assembly "language" is dependent on the architecture it will run on, which may differ quite a bit from one CPU to another. So if you've written assembly for one architecture, does that mean you can i...
I understand that (1) XML/XSLT/XPath and (2) asynchronous programming may not be related to one another. My questions are: When a C# developer job is advertised saying: "the following skill is required as mentioned in 1 and 2", what does it actually mean? Lets say I need to master these two topics (1 and 2). What do I...
I'm currently doing a code review and one of the things I'm noticing are the number of exceptions where the exception message just seems to reiterate where the exception occurred. e.g. throw new Exception("BulletListControl: CreateChildControls failed."); All three items in this message I can work out from the rest of...
There are something out of box to generate time expiring in php? For example I need to control the access to the system, I was thinking something to verify every first day of every month, and do this in my code. But it is not 100% safety, since another programmer can remove this line code that verify. Then I thought i...
I wanted to know whether you think and audio background is just a distraction or could be of some help while programming. For me, it works like this: when I'm writing pseudocode, or implementing procedures that are very clear in my mind in a language I can write without looking up docs, having music playing in the bac...
I'm working on a large project and I would like to put together some technical documentation for other members of the team and for new programmers joining the project. What sort of documentation should I have? Just /// code comments or some other file(s) explaining the architecture and class design? I've never really ...
Are there some recomendations on Open Source or Free PHP Encoder systems? Is something available?
As you all know ASF quit the JCP and the things between them and Oracle are not going so smooth. Not only that, Oracle is cooking some enterprise level JVMs. With all of these happening, I think it proves that Java is moving to a more closed-source environment. I'm curious if this will affect all those apache projects...
Its common knowledge in programming that reinventing the wheel is bad or evil. But why is that? I am not suggesting that it's good. I believe it to be wrong. However, I once read an article that said, if someone is doing something wrong (programming wise) explain to them why its wrong, if you can't, then maybe you sh...
Let's say that we have an application, with two (or more) different versions. E.g. Professional and Lite editions. What would be the best way to keep the source under version control (DVCS in particular). The assumption here is that some or most of the code is common, but the Professional edition has some extra code as...
Along with the other qualities should a programmer need good debugging skills? If I have an applicant who was not able to find the error in the given program, but was able to solve all puzzles and programs, should I consider him for the job? EDIT :- The puzzles are normal red,blue and red-blue balls like. The programs...
I'm looking for other options for maintaining my personal JavaScript namespace. The problem I'm having boils down code Organization Vs. Performance. I would simply LOVE to be able to separate major sections of my code into a more "traditional" style. But I haven't because if I were to do that I would probably quadru...
I'm currently mentoring a small team of 4 junior dev in small software company. They are very smart and often achieve their tasks with a high-quality job but I'm sure they still can do better - actually I have exactly the same feeling for myself :) -. Besides some of them are more "junior" than other. So I would like t...
Should error messages ever be presented to an end user and if so what rules or advice should you have about what should be in them?
Programming always required to learn new concepts, paradigms, features and technologies and I always have been failed at first attempt to understand new concept what i encounter. I start to blame and humiliate myself without remember before how i understood new concept which i hadn't understand it before. I can hardly ...
I've been working for a contractor who brings in some good projects, but they are all fixed-price and often fixed-time. As a result he always has me making a quote over loose requirements, which never fails to bring a lot of tension due to feature creep. He claims he'd never get a contract if he couldn't agree on a pr...
I came across something like this in an open-source project. Methods that modify instance attributes return a reference to the instance. What is the purpose of this construct? class Foo(object): def __init__(self): self.myattr = 0 def bar(self): self.myattr += 1 return self
My team and I have designed a simple, affordable conceptual modelling language as part or a larger research project. This language is aimed to end users with little or no training in information technologies. It allows them to create class models using basic constructs such as classes, attributes, associations, and the...
This is somewhat related to another question i just asked, but I'm freelancing solo and remotely for a contractor who is to project management, what big ball of mud is to code, so to speak. I've been thinking a lot about working on a proposition to deal with his projects in a truly agile way. As I see it, this would in...
Always when the term RAII is used, people are actually talking about deconstruction instead of initialisation. I think I have a basic understanding what it might mean but I'm not quite sure. Also: is C++ the only RAII language? What about Java or C#/.NET?
I have been working with MEF for about 2 weeks. I started thinking about what MEF is for, researching to find out how to use MEF, and finally implementing a Host with 3 modules. The contracts are proving to be easy to grasp and the modules are easily managed. Although MEF has a very practical use, I am wondering to w...
Please note that I'm moving my original question from StackOverflow to here, because I think it's more on-topic here So, I'm working on an idea and I'll go into a brief overview of that but my question is, What are some good web frameworks for this situation? I have some experience in the following languages: C# Pyth...
Just when I generated a GUID, I found some hyphens in between the character and also at specified intervals 8b55fec7-c987-4e7b-abad-16e5aaea9b53 Is there any story behind this? Note: My intention is to remove those hyphens as I am adding this GUID to a filename and our filename should only be aplhanumeric.
I am a .NET developer using WPF and ASP.NET MVC and I was hoping to pass some kind of certification exam. There seems to be four exams but I am unable to understand what the differences are even with Microsoft's definitions: MCPD MCAD MCSD MTA How do they relate to each other? Is there a natural progression path thr...
I'm coming from PHP and Python background with little knowledge of C, I have done many web based application now I'm thinking of Desktop application for windows platform. A friend told me to go for Delphi and others are saying C# is the best, well, what I'm looking for is Simplicity Productivity Good API documentation...
I am looking for ways to verify the user in order to reset their passwords. 2 commonly used ones: Email verification Secret question I wonder which will you recommend? I am trying to avoid having to use email at all (users won't need to provide emails, most hosts limit emails sent). But Secret Question alone seems a ...
I am novice developer. While development is going on, we come across different error issues. However for the novice of programming, it is always hard to directly understand them & solve them. I believe, errors are generally related to typing error OR data structure error OR run-time memory error - which is related to h...
Can programming become language-independent? Will we always program in English? Will we ever be able to program in our local languages? Is there any research that addresses the matter? Are there any such developments?
Possible Duplicate: How do you dive into large code bases? So there is a question about understanding code. Mine is a similar problem. It started when I joined my current org. and like I always do at beginning I tried to get a feel of the code starting from high up and working my way down to details. Only, there is ...
Do you think it makes sense to enforce that every member of a team must use the same IDE? For instance all engineers that are already on the team use IDE X. Two new engineers come and want to use IDE Y instead because that's what they have been using for several years now. Do you have any experience with "mixed IDE" te...
My questions are: What is the difference between WCF service and a simple Web service in .NET Framework? What a WCF Service can do which a .NET Web service cant? In other words, what are the limitation of .NET Web services which were overcome in WCF services? I understand that WCF are REST based and .NET web services...
I have created a small web-app and want to deploy it. I have used struts2 and mysql for the database. The problem is that I do not have a static ip to run the app on my machine. Can anyone suggest me hosting services that host java pages and mysql? Since this is a project I am not doing for money, I would prefer free ...
For enterprise windows-based solutions, .NET is the best choice sometimes. How is Mono looked at by the enterprises who have to use Linux (or rather prefer to use Linux) ? Assuming that the developers aren't a problem and they are familiar with .NET/Mono and other possible competitors such as Java. Would a medium/la...
What is the bug workflow on your agile/Scrum team? Here is ours: - If the bug is related to a story in the current sprint, we fix it. - If the bug is not related to a story in the current sprint and it is not critical, it is sent to the product owner for prioritization. - If the bug is not related to a story in the spr...
How useful is it to measure function points? We use function points at my new job. I've heard of function points but haven't had any training or experience... but I don't have much confidence in things that cannot be explained succinctly.
Example: You create an abstract class for Ajax actions. Different Ajax actions will all extend this class. Problem: Do you name the class AjaxAction or AbstractAjaxAction? When you create subclasses, do you name them: Action AjaxAction Just name them what they are I have not been able to find what the "official" co...
Does it happen only to me or is this familiar to you too? It's like this: You have to create something; a module, a feature, an entire application... whatever. It is something interesting that you have never done before, it is challenging. So you start to think how you are going to do it. You draw some sketches. You wr...
Hey... its XMAS Eve and something is bugging me... yes, I have work on my mind even when I am on holiday. The vast amount of frameworks available for PHP now use MVC. Even ASP.net has its own MVC module. I can see the attraction of MVC, I really can and I use it frequently. The only downside that I can see is that you ...
So, we've got a product, written in Perl. Mind you, it's good Perl, pretty well object-oriented, with a strong functional-programming influence, extensive test suites, and it's an agile environment doing Extreme Programming with elements of Scrum. We also have about 4 open headcount that we're trying to fill sooner rat...
I'm CTO of a software firm with a large existing codebase (all C#) and a sizable engineering team. I can see how certain parts of the code would be far easier to write in F#, resulting in faster development time, fewer bugs, easier parallel implementations, etc., basically overall productivity gains for my team. Howe...
Thought of learning Qt. Need help from experienced ones out here. How should I begin. Some good books to refer. Some good tutorials to learn... Edit: Also which is the good IDE available out there for Qt programming. One that gives inline help, auto completion,indentation... I am using Debian Lenny
I work for a company that primarily builds Java applications and I'm trying to convince everybody to stop checking-in binary files (dependencies and final products) to SCM. They know it is a bad practice but they think that "it works" and it is not really a problem even when many people know about Maven and other tool...