instruction
stringlengths
34
19.9k
I wrote a program in PHP. I want people to be able to use the code to learn from and even include bits in their own apps but I also want to maintain the right to sell it and make it clear that others are not to distribute copies either for free or for profit. I haven't used anyone elses code so I don't have to worry ab...
Where I work developers are always telling me that "I added this just in case for the future" or "I think it's a good idea to do this because they'll probably want it some day". I think it's great that they're proactive in trying to anticipate future changes but I can't help thinking that it's unnecessary and risks wri...
What would be a good first functional programming project? I am looking to finish with a bang on my bachelor project and I want to finish it with a functional programming project. We didn't study it in school but we are encouraged to try to learn new things ourselves, and I thought learning a new paradigm not only a ne...
I am working on an idea as a hobby project, and I have almost finished it in android and about to finish in Java ME platform, and we are also planning it on other smartphones including blackberry, iOS and symbian phones. But coding on these platform is not started yet. Here are my questions regarding to that Is it a wi...
I am currently facing a situation where I am not quite sure how to best proceed. Background I am planning a new data import process, which will import personnel and salary information from a text file produced by a different system. We already have an import process for the data in question, but the format of the impor...
coming from the PHP-framework symfony (with Apache/MySQL) I would like to dive into the Scala programming language. I already followed a few tutorials and had a look at Lift and Play. Java isn't a stranger to me either. However the past showed that it's easiest to learn things by just doing them. Currently we have a li...
I'm really confused.. I'm looking into making a commercial program and there are a few open source, GPL covered components i'd like to use.. Am I allowed to sell my product with the components in without distributing my source? For example.. say i was making a commecial text editor, and my friend has a really awesome ...
I asked a question a while back about knowing when you're ready to look for a job and got positive replies. Now I'm working on writing up a resume to begin my job search. The title pretty much sums up the question, what should a self-taught programmer who has nothing but personal project experience put in a resume? PS....
I've been working with the Oracle RDBMS for a few years and today, after installing one for the n-th time, I was left wondering, why do we install it in /u01, /u02, etc.? Of course you could install it somewhere else, but for some unknown reason, this convention is used everywhere and I haven't seen any serious Oracle ...
I'm developing a prototype of a web application. I want to only use HTML, CSS and Javascript. I prefer to use my text editor and not having to learn (or pay, for that matter) a new tool like Axure. What would be, to your mind, the best practices? To me there are many qualities for a good prototype: Quickly developed E...
A chap I'm bidding to do some development for has a social network he wrote himself. Not the next facebook by any stretch. But a few thousand local users. I went to have a look at it to see what level of knowledge he had so I knew how to position myself for this potential job. I tapped a single quote into the login box...
I keep hearing about Cloud technology, although mostly in social networking development, etc. I heard about it today again, and now I'm very curious: what is the 'Cloud' and how does it relate to me (in my case, I guess) as a Web Developer? How do I answer the question I keep getting asked—"is it on the cloud?"—withou...
So time is changing towards cloud development/computing. I'm trying to get the new "cloud" workflow based on the services I'm going to use: Github, Cloud9ide and CloudFoundry. Here is what is on my mind: Github acts like a central (main repo) just like yesterday's local filesystem. Every service will base it service u...
I find that even when working with a MVC framework (e.g. CodeIgniter), I regularly resort to passing nested arrays rather than objects. This doesn't follow my understanding of object-oriented well. For example, if I were to port the code to Java then I wouldn't dream of passing arrays (or Vectors, or whatever) around ...
When I want to develop a new application, first I'm going to design a UML and specify project details and definition. But when I start development process, I determine that I should change some parts of my idea in order to become more popular software or easier logical steps for my users or simpler process or anything ...
When I challenged Chrome development team about their decision to block every version of the Java Plug-in by default (http://code.google.com/p/chromium/issues/detail?id=84001). They answered that Java Plug-in is not widely used anymore. Google is also officially stating this: https://www.google.com/support/chrome/bin/a...
For the last two months or so I have been looking for solutions or practices to handle release management within databases. I'm looking for what people view as the best process for handling this. We have 3 environments for our databases: Development User Acceptance Testing (UAT) Production The problem is sometimes w...
Is bubble sort the least Big-O efficient? If the answer is no, then what is the least efficient sorting algorithm?
I am writing an admin panel in cakephp I got a question the panel will have the functionality to add items to the main website (images specifically) so I am wondering if I should put all the functionality (add,edit,view,delete) to the main admin controller or should I make a different controller for that? As the admin ...
I'm building a site with PHP and a MySQL backend. But, I am currently not using any type of framework. Should I be using Model View Controller?
I've been having a debate within my team on what constitutes a Data Access Layer vs Data Functions vs Business Layers. My thoughts is all database access is done in a data access layer with Repository classes. The DAL contains utility classes & methods that populate a DataSet, List<>, POCO, Execute SQL, but as internal...
Is it considered impolite to file a bug report against an abandoned open-source project, or an abandoned branch of a still-continuing project? Is it perceived as making a request of the former author(s) of the project, which they're no longer willing to fulfil, or are bug reports merely seen as a description of the cur...
I've been here for nearly a month and it seems that people have a tendency to be eager to use the "Premature Optimization is the root of all evil" argument as soon as someone mentions efficiency. What is really a premature optimization? What is the difference between what is essentially writing a well designed system, ...
SO I have made this program dealing with cities and the roads linking them, and I am wondering if anyone could point me towards a way to represent this "network" graphically (in 3 or 2Ds). Could be either a specific programming friendly file format (which I could easily generate an instance of programatically), or a sp...
I'm too lazy to look at a pdf/table when the next tram is, so I did a windows widget that always tells me when the next one is. You can add, edit and delete trams to be watched. I don't work for this company, but I have tried to make it as professional as possible and I even threw the company logo into the widget. I be...
Here's my situation: I'm starting a small computer repair business on the side. I'll be making house calls in my neighborhood but in the future I'd like to provide remote support. I was thinking of a VNC-based solution but I don't know if it would be practical to use an existing one or not. I was tossing around the ...
Programmers tend to talk about being a "code monkey" in a derogatory way. "Don't work there, you will just be a code monkey!". I have two offers for jobs, one at a small company, one at a very large company (same salary). My friend just told me I will be a code monkey at the large company, and knows from first hand exp...
There's an approach to organising information that says that hierarchy is a tool of the devil, or at least is overrated. I've embraced this understanding for a data-driven site I'm working on which has a fixed set of admins who create and tag data and a slightly less fixed group of data consumers. It uses tagging and s...
I am absolutely convinced that you one make a very good living as a consultant that helps customers with deep understanding of and practical knowledge in one of the following topics Time zones, daylight saving time and leap days/seconds in software processing any kind of events Character encodings Both are small nic...
I'm currently developing, on an independent basis, an application that is highly domain specific; a niche application if you will. This is all well and good, of course; but there is one problem; I'm not in a situation where I have a natural tester group. The issue is not really one of finding testers for technical accu...
(I've been wondering all day whether to ask this question here - my biggest concern would be that it would be seen as off-topic, or not relevant. It's not relevant to the US, this is true, but it is VERY relevant the UK market.) My question is: do hiring managers / IT decision makers in the UK use data from ITJobsWatch...
Most of the software I have written over my career has been built for English speaking customers, but recently I've been working on a project where localization of the UI for a wider range of languages is desired. I am just curious how other programming shops obtain the translations. Do they use the notoriously flawed...
Let us say that someone writes a piece of software and licenses it under the GPL. Then they go on to sell it. Will this be effective? Won't someone just buy it and redistribute at a lower price? Do any of you know GPL licensed software that is being sold? Also if you know of any instances where someone bought such soft...
I was recently rejected from a college that had previously accepted me, on the grounds that I spent a year of high school in a foreign country and the college wasn't interested in recognizing education received in another nation. Because of this a very generous scholarship has dried up, and and financing an education i...
Suppose X is the input language, Z is the output language, then f is the compiler, which is written in language Y. f = X -> Z Since f is only a program, I think Y can be any language, right? So we can have compilers f1, f2, each written in Y1, Y2. f1 = f Y1 f2 = f Y2 g = Z -> M h = g . f # We get a compiler X...
Possible Duplicate: How to prepare yourself for programming interview questions? Could someone give me pointers on how go to about preparing for a technical interview? As a CS graduate, I guess one must be thorough with the following topics: Data Structures: Array, Linked List, Stack, Queues, Heap, Hash Table, Bina...
I volunteered to instruct an after school computer club at my son's middle school. There has been a lot of interest in computer viruses. I was thinking about showing them how to create a simple batch file virus that will infect other batch files in the same directory. Also show how creating a batch file with the same n...
I know Joel says that rewrites are always bad, m'kay, but that is assuming the person who wrote the code in the first place had some idea what they were doing. I've got a medium sized (for a single developer anyway, ~18k LoC) C++ project, which I started when I did not truly know C++. Therefore, there are several thing...
As a young developer, I would find it useful to get some advice regarding things to think about in order to develop a high-quality application. In my college courses, most teachers emphasized input validation and some talked about security concerns, but no one covered the importance of certain other things, like loggin...
A colleague of mine today committed a class called ThreadLocalFormat, which basically moved instances of Java Format classes into a thread local, since they are not thread safe and "relatively expensive" to create. I wrote a quick test and calculated that I could create 200,000 instances a second, asked him was he crea...
I'm having a rather Oatmealesque experience with a particular client's website. The latest 'feature' they have requested is that background music play automatically when the site loads. What should I say to gently convince them that this is a bad idea?
I am preparing for technical interview and would like to brush my coding skills. I have written a C++ program and would like to test it online. I don't have access to any linux compiler on my machine. Where can I do it? I have perception that I can do it in code.google.com -> Google Code Playground but I don't see wher...
I observed that discussing with your self about a problem is a fairly common practice. I find it is even better to write what you think. Not only it forces you to materialize your problem, but the written material can serve you as a log for future reference. I have been trying different ways to log my self chatter, I c...
When I build a simple website, e.g. a contact book where I can add, delete and update contacts, I create an index.php file where a user, if he's not logged in, is requested to enter a password and if he enters the right password, he's assigned a session and can do certain things with the contacts. I have two files: T...
I just took an Amazon online test and I messed it up badly. I am out of practice and have low confidence in writing code. Are there any coding sites with test harnesses for basic data structures and with basic problems like arrays, strings, linked lists, graph adjacency lists etc, so that I can brush up on basic code l...
I'm looking to reduce the initial costs of starting a business. As much as I like Windows Server 2008 and SQL Server 2008, I think their per-processor sale model is very expensive. Plus, if the business were to grow, new web and database servers would depend on those, increasing expenses. What are the most popular (i.e...
Is apple phasing out support for objective-c++? Note the following: In the Objective-C language manual, there used to be a section on mixing objective-c and c++. That section is now missing. Links to articles on objective-c++ on the apple developer website seem to be broken, and are now redirected, e.g. this one, wh...
I understand plagiarism and paraphrasing fairly well when it comes to writing a research paper, but those equivalent areas in programming seem foreign to me. I've looked up the topics online, and surprisingly there is not as much material on the subject as one would have expected. When writing code and having to implem...
So I just learned red black trees at Cormen and wow! Typically I like to understand all algorithms and data structures to the point I can rebuild them from scratch without having to cheat looking at the pseudo code. I really like algorithms so I enjoy learning how they work and I usually go line by line and try some ca...
We are implementing some web services, and need to ensure that some of our methods always return non-null values. We've investigated two ways of doing this: Using code contracts, and returning the default value using Ensures constraints on the return value. Using an aspect-oriented programming approach using PostShar...
Lets say you don't use a license for your open source project. And you don't put anything about a license anywhere in the code..is this okay to do?
I don't like writing open-ended questions but I have a quick security question. I have a PHP login script that shows a CAPTCHA on the third failed login attempts. The way I'm counting failed logins is by using session data. Is this secure? Is there a better way to do this? Maybe store the IP in a database table? I'm no...
Take this scenario: A programmer creates a language to solve some problem. He then releases this language to help others solve problems like it. Another programmer discovers it's actually much better for some different category of problems. By virtue of this new application, the language then becomes popular for that ...
While developing a library using C, what are your recommendations about variable and function scoping? In C++, OOP and namespaces made the whole thing a lot easier. But how to do that with plain C? Specially how to use the keywords static and extern in headers and code files to manage scoping?
How do you deal with different project environments? Every project might require a different database (oracle, IBM db2, mysql & etc), a different server (tomcat, IBM WAS, weblogic & etc) or some other new technologies. Every time a new database or new server comes in, I install them on to my workstation for my conveni...
I recently suggested a method of chaining be implemented for a certain class in a certain project so readability of the code could be improved. I got a "fluent interfaces should not be implemented just for convenience, but for semantics" answer and had my suggestion shot down. I answered that I was not suggesting a flu...
I am planning to create a website like what http://dohop.com is doing that will allow a user to pull the airlines price rate and date from the http://airasia.com website. Currently the site will only allow the user to view the flight schedule for one day and if they wish to view x days ahead they need to repost the dat...
What do you think would be the primary reasons to make APIs with REST or OData instead of just making everything custom (for example only using GET requests, even for setting variables). Reasons for the opposite also welcome. As a bit of background, it's going to be used for a request that is sent once every few minute...
I am trying to understand the formula, but I am a bit in doubt how exactly you define edges and nodes. Edges seem to be every possible exit from a statement and nodes seem to be statements, is this definition wrong?
There's nothing perfect under the sun. Qt is no exception, and it does have limitations: we can't use pixmaps in a thread other than GUI, we can't use QImage with 16-bit-per-channel image format, etc.. Which situations have forced you to spoil the design because of Qt's limitations? What are the most hated quirks? Whic...
There are many requirements needed for a system to properly convey and handle exceptions. There are also many options for a language to choose from to implement the concept. Requirements for exceptions (in no particular order): Documentation: A language should have a mean to document exceptions an API can throw. Ide...
Normally, the company where a programmer works has corporate licensed tools which are useful for programmer (ex: proprietary IDEs, reflectors, diagramming tools, office tools and PDF makers, etc.) Can I : Install it at home and use it for company projects? Install it at home and use it for personal projects (possibly ...
We hear much about code smells, test smells, and even project smells, but I have heard no discussion about employer "smells" outside of the Joel Test. After much frustration working for employers with a bouquet of unpleasant corporate-culture odors, I believe it's time for me to actively seek a more mature development...
I joined my company 2 years back which is a startup company that has been around for 5 years now. From the beginning I've been working on one of the Microsoft technologies. Just after few days I joined the company I learnt that the company doesn't have a working process in place right through the software development l...
Following up my previous question I wonder if resumable exceptions make any sense. It looks like nobody uses them in Java. Don't they use resumable exceptions because of Java limitations or just because they don't really need them? Suppose, I want to create a file in a directory, which should exist but does not. I woul...
I've seen a spate of questions on Stack Overflow and elsewhere about downloading programming tools and where to find them. Sometimes developers can't find a download link or availability in their country. Rather than encouraging them to violate laws, I think general education for these users is of the utmost importance...
I'm working on a project that has frequent changes on the database and the implementation layers. I was releasing both the code and the database under the same release version, but since the database changes are more frequent than the core implementation, I'm thinking of separating their release/plan. Is this the norma...
When you find a new open source library / project, what criteria do you look at before incorporating it into your source base. Are there legal questions you need to answer? Do you look for a certain amount of development velocity? Is the community buzz a good enough reason? Does your decision change if you are the on...
According to Wikipedia, CSS is a style sheet language. However, it's pretty much the only such type of language in use (at least from a web developer's perspective). When trying to categorize CSS as a language or technology (e.g. for a résumé), would it be acceptable to simply call it a domain-specific language? If you...
For some reason I got thinking the other day about DBAs and what they do. This thread goes some way to answer this question, but then I looked up the leading jobs site in my area out of curiosity, and it seems like there are more Oracle DBA jobs around than many other technology specialties. Even relatively common-soun...
I'm writing an authentication system which uses XML formatted messages between client/server. A successful username/password authentication needs to return a randomly generated session ID to the client: <?xml version="1.0"?> <amhAPI> <auth> <sessionId>728c91ea-2ead-4fa9-93c5-3a8453174bea</sessionId> </a...
all. I'm wondering how do you spec./plan out your project? For example, for webiste you can use Wireframe. How about for desktop or add-ins such as MS Office add-ins? I want it as simple as possible and don't want spend all day using some sort of diagram software to sketch it out. Do I simply write down what features I...
I see that most of the apps that include heavy GUI content are usually developed in C++. Most of the games/browsers are coded in C++. Can't we just develop better GUI apps with the latest dynamic languages? I know java wouldn't be a great choice. But what about languages like python which are natively built on C? Aren...
The company I work for has recently been given an order to improve an App that is previously developed by a different company. They use a bundle identifier like com.theircompany.appname, however, I cannot register that bundle ID for generating an App ID for APNs. I wonder what the consequences are if I change the bundl...
The problem I am facing: My team members start working on projects without the functional/technical documents ready - even if our company process dictates these should be there before starting. My team members accept cheap, unstructured solutions and will implement really bad hacks into software without thinking twice...
I have been given the task of implementing some QA testing into a massive existing system. We're going to start out with system-level tests and might add unit tests if it is deemed necessary. I don't really know where to start. I'm thinking of creating a new project in the main solution dedicated entirely to QA tes...
I am an entry level developer with 1 year of experience. I have worked on a large scale project which I have played around 80% of the project work, those 5 months were terrible to me - late nights spent working, even Sundays. i have worked on whole Process Model , doing some of my colleagues work ,DB Design ,client fee...
I have some trouble understanding MSPL (Microsoft Permissive License) conditions regarding linking to / using a library under MSPL from a project of mine which I want to license on either AGPLv3 or pure GPLv3 (the Affero-part should not play a major role in my question as far as i can see - but please correct me if I a...
Why does Aptana Studio need Git installed on Windows?
I'm reading a book that has a section about processes. In it is this sentence: The next method to enumerate processes is the GetProcessById method. This method does exactly what its name implies: it will take a process ID and return information about it if it's found. This doesn't sound right to me. Google dictionary...
I have one Linux VPS server for my company and we develop PHP sites. What i normally do is just make the subdomain of main site like test1.mainsite.com and work on that till it finishes. and then chnage the domain name. I have heard that big companies have the staging server and production server. I just want to know h...
I have been programming in the same Object Oriented Programming language for many years (Windows-based). The problem is this particular language is not very popular, and not one of the hottest ones in demand in job postings and such. Should I be worried? Would a Java employer understand that I'm a programmer and can pi...
I would like to know if you guys have any best practice when dealing with transaction between different databases vendors. For example, if you have a C# application that save customer data in two databases (one Oracle and the other Microsoft), what would you do? Would you use OleDbTransaction? Is it possible?
Being the creator of a program, you are probably in a better position than anyone to be aware of security vulnerabilities and potential hacks. If you know of a vulnerability in a system you wrote, is that a sign that increased security MUST be added before release, or should this be evaluated on a case by case basis to...
Any non-trivial commercial application/program/system/what-have-you requires testing (QA/QC). Not counting things like automated tests, how much time/money relative to the development investment in the project should be spent testing (e.g. with live people)? I know there's no magic percentage of time or budget, and ind...
I am intending to work as an independent contractor, writing software for a client based in another country. My work will be provided electronically so I won't need to relocate. However, there is a legal dilemma, as I see it: If the draft contract stipulates that governing law is the law of the country where the clien...
Eg. Another stupid Fart app or something of that sort. Not for money or recognition or anything else except maybe the experience you get from it. Are there any caveats one should be a aware of before deciding to go through with it?
First off, is there any difference between a license and a EULA? Second, can a developer write his own license or is there some special legal crap you have to do. Finally is there some kind of lawyer that specializes in writing licenses for software? What kind of legal professional would you hire to do something like ...
I understand the reasoning behind Joel Spolsky's article "Things You Should Never Do, Part I", but I always see it referenced in regards in situations where the end goal is the production of software. What if I'm a developer who maintains an ecommerce site? My job isn't writing a retail platform, but instead putting it...
I was told by a few members here that splitting up my unit tests into different assemblies for different components is the best way to structure unit tests. Now, I have a few questions about that idea. What are the advantages of this? Organization, and isolation of errors? Let's say I have a component named "calcul...
I got out of school about a year ago, and have been freelancing since then. Sometimes it seems like it would be a good idea to work for a company for a few years, to learn from people with more experience than I have. But on the other hand, working for myself has let me pursue projects/technologies that I'm interested...
How to spot that someone copied open source code licensed with GPL to their closed source commercial application, when you don't have access to their closed source code? Edit: Great answers! Part 2. What if it is a webapp where you don't even have access to the executables? Scenario: They copy the source, make some mi...
I am currently using VB.net 2010 and WPF 4 to create an application, but the further I learn it, the more I realize that the two programming languages may not meet my needs, especially where I have to migrate a version to a web-based Silverlight platform. With this in mind, I'm thinking of dumping the Microsoft program...
Programming books often contain a lot of code scattered within it. Usually there will be an accompanying website to download the code used in the book. How do you use the code? Do you just run them and check the results or do you code it from scratch again? If you are coding it from scratch, have you found any advantag...
I'm working in a project that use nhibernate as orm. Is there any benefit for me to use sharp architecture? what is these benefits?
Even though at first glance the words AddIn, AddOn, And Plugin give the same meaning, there are some differences between them. Could anyone explain to me the subtle differences between AddIn, AddOn, And Plugin?
What are the topics I should learn for a BPM (Business Process Management) product? I mean, do I need to learn BPMN (Business Process Modelling Notation), BPEL (Business Process Excecution Language)? Are there any open source lightweight BPM products by Apache or somebody?
When developing in OOP, sometimes an interface / contract is given by a library that you cannot alter. Let's call this interface J. Now you have an object of class A that consumes objects that implements this interface. Inside A only a small part of the interface's definitions are needed. Some of the object classes are...
We’re roughly midway through our transition from waterfall to agile using scrum; we’ve changed from large teams in technology/discipline silos to smaller cross-functional teams. As expected, the change to agile doesn’t suit everyone. There are a handful of developers that are having a difficult time adjusting to agile...
Awhile back I posted a question about a kid I know and his dilemma about getting a college degree. He has decided to go for it and apparently already has some credits in computer science and math already (AP or something?), so he gets to move on to more interesting stuff. One of his choices as an elective programming ...