instruction
stringlengths
34
36.1k
I'm just looking for some tips on getting away from using PHP for web development. I'm self-employed but it seems like all of the work I find deals with PHP. I'm not complaining about the work -- just the poor choice of a language that is incredibly popular. I'd love to do my web development in Python, Perl, C#, or eve...
When looking at comparisons, it seems to me that there could be a 1:1 mapping between their feature sets. Yet, an often cited statement is that "Mercurial is easier". What is the basis of this statement? (if any)
The question Do you actively think about security when coding? asks about security mindset while programming. Obviously, a developer does need to think about security while coding — SQL injection, password security, etc. However, as far as the real, fully-formed security, especially the tricky problems that may not be ...
I built a lot of websites and applications during my life, I can put them under the following categories: Did all the project as a freelancer -> For other companies Did part of the project as a freelancer -> For other companies Did all the project my self while was working for another company Did the project w...
I'm starting to get into writing automated Acceptance tests and I'm quite confused where to write these tests against, specifically what layer in the app. Most examples I've seen are Acceptance tests written against the Domain but how about tests like: Given Incorrect Data When the user submits the form Then Play an E...
Quite often benefits of using TDD are considered as 'long term' gains - the overall code will be better structured, more testable, overall less bugs reported by customers, etc. However, where are the short terms benefits of using TDD? Are there any which are actually tengible and easily measureable? Is it important t...
I am a big fan of writing assert checks in C++ code as a way to catch cases during development that cannot possibly happen but do happen because of logic bugs in my program. This is a good practice in general. However, I've noticed that some functions I write (which are part of a complex class) have 5+ asserts which fe...
MVVM pattern is a hot word recently and I am planning to learning and refactor my existing project into this pattern. I have no experience and foresight of the potential risk. Have you guys really get lots of benefit from the MVVM Pattern in real-world projects? Is it worth refactoring an existing non-MVVM (mainly us...
What exactly is the different between "extensible programming" and "extendible programming?" Wikipedia states the following: The Lisp language community remained separate from the extensible language community, apparently because, as one researcher observed, any programming language in which programs and data ...
I've been working on various projects at home and at work, and over the years I've developed two main APIs that I use in almost all AJAX based websites. I've compiled both of these into DLLs and called the namespaces Connell.Database and Connell.Json. My boss recently saw these namespaces in a software documentation fo...
I am a programming intern who has worked for a company for 6 mnths now (this is my 1st programming job so I have 6 mnths experience). I am a 1 man team right now & I am creating a mobile application using the Mosync C++ API. I am looking for advice on how to report a bug to a boss who is not a programmer. I have had tr...
Is it right or more beautiful to name the functions with an prefix, like in Qt? Or using "many" namespaces, but 'normal' names for functions? For example, slOpenFile(); //"sl" means "some lib" vs some_lib::file_functions::openFile(); Update: I've read somewhere that the first variant(using some prefix) is better,...
Suppose there is a part of program that does not deal with initialisation, input, output. It just specifies what should be done, what is allowed or not. I use the term "Business logic" for this. But application can have nothing to do with business. Example: a game. Suppose there are following parts: Input processing...
I've dig the database here and didn't found any answer for my question. What is a standard for a php programmer to know? I mean, literally, what group of language functions, mechanisms, variables should person know to consider oneself a (good) php programmer? (I know 'being good' is beyond language syntax, still I'm co...
I know in advance that people are going to see this question and think "free Red Bull." But I am actually looking for the best way to tie rewards for developers to the company's long-term goals. For example, assuming a team is working on the same software product, would it be best to reward each developer based on the...
With a simple search in amazon one can see that the modern approach for parallel programming is to use your graphic card. However I am still a little bit skeptical about it. My last computer has an 8 core CPU which I need is enough for basic all my parallel needs, if I need more I will probably use MPI through a networ...
I'm an UG Student and an Entrepreneur. I have started a small company with which I'm trying to provide solutions, to various companies in my city, through my software. I put in 30-40 hours of coding and development. I've been a huge fan of Open Source projects and I've also built by software on python. But now when it...
I've come across quite a few sites that either limit the length they allow passwords to be and/or disallow certain characters. That's limiting to me as I want to widen and lengthen the search space of my password. It also gives me an uncomfortable sense that they might not be hashing. Are there good reasons for either ...
My team makes a product (business management software) that our customers install on their own servers. The product uses a SQL database for data storage and app configuration. There have been quite a few cases where something strange happened in the customer's database (caused by bugs in our app and also sometimes admi...
I am a proponent of Behavior Driven Development, mainly with Cucumber and RSpec, and at my current gig (a Microsoft shop) I am introducing SpecFlow as a tool to help with testing. I'd like to get the business analysts on my team involved in writing the features and scenarios, but they are put off by the "technical" asp...
I'm planning to use OpenCart to build a web site. According to the licence (GPLv3) it's necessary to provide the source code of any modifications made. Is it acceptable to provide this on request or should it be linked to from every page on the shop?
I run an offshore development team that produces a host of financial products. We are currently planning the work needed in order to gain PCI compliance. The offshore team is run by an outsourcing operation who employ the staff directly. In other words the developers are not directly employed by us, but are exclusively...
WebServices are one possible implementation of a SOA, so there comes the name "Services" from. But why are they called *WEB*Service? Is it because they use web technologies and protocols (HTTP, XML, ...) for the implementation?
If I wanted to make a mobile version of a website, what are the most common screen resolutions that I should be testing on?
The benefit of a compiled application was that all the libraries and classes are loaded one time and sit waiting for input right? I come from a background working with PHP and the resources/classes that used are loaded each page request which puts an bad load on the server memory. For example, given the PHP core uses 1...
Over the past few years I have worked with several different version control systems. For me, one of the fundamental differences between them has been whether they version files individually (each file has its own separate version numbering and history) or the repository as a whole (a "commit" or version represents a s...
I have been programming for a very long time and I have in depth knowledge of several technologies. Recently I applied for a web development job and in my resume I had listed all the skills - HTML, CSS, JavaScript, jQuery, AJAX, PHP, ASP, JSP, C/C++, ARM. Except for C/C++ and ARM I had shown the skill level for all tec...
I'm working on a small project right now that I plan on releasing under an open-source license (haven't decided which yet). The question I have is that one of the Python modules I use is licensed under GPLv3. Since I'm not making any modifications to the library (using it as-is), can I still license my project under ...
I was listening to Jon Skeet's talk at the last StackOverflow Dev Days and he piqued my curiousity regarding internationalization. Suppose I have a waffle-making program, either complete, or still in progress, and I want to distribute it to other countries. What kinds of things do I need to worry about regarding intern...
I was watching http://www.joelonsoftware.com/items/2011/06/27.html and laughed at Jon Skeet joke about 0.3 not being 0.3. I personally never had problems with floats/decimals/doubles but then I remember I learned 6502 very early and never needed floats in most of my programs. The only time I used it was for graphics an...
I'm developing a non-free library and I want to use Bcrypt.Net in it. The clause in question: Neither the name of BCrypt.Net nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. To what extent does this mean I can't use the ...
What is the best strategy to go about understanding some one else's code for a medium sized project, if the code is not well documented and does not adhere to many coding standards?
It may be a personal quirk of mine, but I like keeping code in living projects up to date - including the libraries/frameworks that they use. Part of it is that I believe a web app is more secure if it is fully patched and up to date. Part of it is just a touch of obsessive compulsiveness on my part. Over the past se...
A company my friend works for (let's call him Me) recently unveiled a new face for their internal "networking" website. This new face looks remarkably like Facebook, and indeed, examination of the source code reveals that it's almost identical: The code, class names, and even the fonts are the same. There is also no in...
One of the projects I work on is measured by number of issues. Management has given arbitrary (as far as I can tell) measurements that we need to have no more than X number of bugs and Y number of features in our issue tracking system. This seems like a misguided approach, but I can't seem to find any writings on the s...
Reference The post that started it all In order to clear up the original question I asked in a provocative manner, I have posed this question. If you learn an algorithm from an open source project, is it OK to use that algorithm in a separate closed sourced project? And if not, does that imply that you cannot use that ...
Sorry if this question is a duplicate, I did some extensive searching and found nothing on quite the same topic (though a couple on partially-overlapping topics). Recently, whilst on holiday in Munich, Germany, I was taken aback by the sheer number of programming-related posts available in the city that I easily qualif...
I have been working with an old OS9(not mac) operating system and I have been trying to get my organization to transition to an embedded Linux platform. We have money in the budget for training and I figure I would take advantage of it. A secondary impetus would be a good resume addition. What are some good vendors/b...
I'm trying to get out of the Corporate game and go indie. I've always prided myself on being a jack of all trades so I think it suits me. If you're a freelancer or independent, what's the best advice you could give me as I start down this road?
Imagine I have a code base and I'm obsessively concerned about the protection and privacy of that code. If I were to hire a freelancer to work on that code base, I'd probably have the freelancer sign a nondisclosure agreement and hopefully I'd build up a relationship with him/her over time and gain some confidence that...
I'm wondering if there is a common license that would be good for snippets of code (eg. things you might just paste into a file), which has the following conditions: Modifications of this snippet must be open-sourced No restrictions on code that uses the snippet Or would this license be too prone to workarounds to ex...
Assume I have enough money to live off of for 3 months. Would it be impossible to just freelance my entire programming career, after sufficiently learning the language and helping open source projects? Or would clients want to see work experience. I am mostly talking about Objective-C development, so I would be publish...
So I just created my first GitHub repository and started to wonder if there would be any reason why somebody shouldn't post their code. I don't mean the obvious, such as code that is IP of somebody else or any other possible legal situation; I'm talking about a newbie posting their own, albeit terrible, code. I've hear...
Basically I have one Tree view which uses a single DefaultTreeModel. Is it okay to use singleton for Tree extending JTree and another singleton for TreeModel extending DefaultTreeModel? If not, what is the reason to avoid using singleton for each object?
GMail has this feature where it will warn you if you try to send an email that it thinks might have an attachment. Because GMail detected the string see the attached in the email, but no actual attachment, it warns me with an OK / Cancel dialog when I click the Send button. We have a related problem on Stack Overflow....
I'm using .Net to build a commercial application, i.e. a secure chat application. This application is using RSA and Rijndael algorithms. Do we need licenses for using RSA and Rijndael algorithms for commercial product?
I have a situation, when I'm working on a project, but at same time small issues arise which require quick fix. I would like to push just the fixes for these problems to the main repo while keeping the rest locally. Problem is that, as I've already found out, it's not possible to cherry pick changsets when pushing from...
I have a script project I've been managing with Git. Besides two main branches, several minor branches have been introduced over time to cover minor features, tweaks or temporary changes. Some of these branches are nearing end-of-life, and I won't be updating them any more. What's the different philosophies for handlin...
I just got a position at a big, well-known C#/.NET company. The thing is that I don't know any C# or .NET at all (they know that) and I want to learn as much as I can before I start, to not waste time (and money). How do I learn C#/.NET quickly and efficiently? Resources? Great tutorials? Videos? EDIT: I forgot to ment...
Many projects combine languages, for example on the web with the ubiquitous SQL + server-side language + markup du jour + JavaScript + CSS mix (often in a single function). Bash and other shell code is mixed with Perl and Python on the server side, evaled and sometimes even passed through sed before execution. Many lan...
Very often I get into C code where printf format strings start with \n: printf( "\nHello" ); This in my opinion is an annoying thing that offers no advantages (rather many disadvantages!) with respect to printing "Hello\n": If the first printed line begins with '\n', program output will begin with a (useless) empty li...
With plain Google as well as Google Code search tools it is easy to find how to program using some resource or solve certain problems (such as create a Java class, or an FTP block in Perl, etc.). So developers are tempted to just purely copy & paste the code (in a way re-use). Is this an incompetency? I have done this ...
To get an idea of what I'm doing, I am writing a python parser that will parse directx .x text files. The problem I have deals with how the files are formatted. Although I'm writing it in python, I'm looking for general algorithms for dealing with this sort of parsing. .x files define data using templates. The format o...
I read a question, and I'm looking for input on how to solve it: Numbers are randomly generated and stored into an (expanding) array, How would you keep track of the median? There are two data structures can solve the problem. One is the balanced binary tree, the other is two heaps which keep trace of the biggest hal...
I am in need of some help with philosophy and design of a continuous integration setup. Our current CI setup uses buildbot. When I started out designing it, I inherited (well, not strictly, as I was involved in its design a year earlier) a bespoke CI builder that was tailored to run the entire build at once, overnight...
When working on a product that needs to be done soon and work well, when is it OK to sacrifice maintainability and "neatness" of design in order to get the thing done and out the door quickly? And to what degree is it OK, especially when the techniques used to make it "neat" are new to me?
I've been asked to run some code metrics in order to assess the quality of the code. One of the metrics was vaguely specified as "comments". I ran Sonar on my code, and while I got 10% on the "comments/loc ratio metric", I got 50% on the "documented API" metric (which gives you the number of methods/classes/instance va...
My boss came to me today to ask me if we could implement a certain feature in 1.5 days. I had a look at it and told him that 2 to 3 days would be more realistic. He then asked me: "And what if we do it quick and dirty?" I asked him to explain what he meant with "quick and dirty". It turns out, he wants us to write co...
I'm working on a project that uses a dataset produced from software informally licensed as "non-commercial use only". I'm developing an application that uses that dataset as an input to another algorithm. Our own software has a permissive free software license in which we don't restrict commercial usage. Are there le...
I am wondering what would be the formal and the most commonly practiced method of documenting business rules? Also how do you document the UI specifications of development artifacts (e.g. Documenting form fields and how buttons behave on form, info text .. etc)
Not sure that this is the right stack exchange site to ask this of, but here goes... Scope I work for a small company that employs a few hundred people. The development team for the company is small and works out of visual foxpro. A specific department in the company hired me in as a 'lone gunman' to fix and enhance...
So I created an HTML5/Javascript online game. I host it on my website for anyone to play for free. I am still currently working on it. Do I need to license my game? And if so, what license do you recommend? I was looking at some open source licenses like GPLv3, but i'm not sure if I even need a license? If I need a lic...
What is the main difference between a Rapid Application Development tool like MonoDev and Visual Studio, is an RAD more focused on one thing? I'm looking to make a web application, are there advantages to using a Web Based Rapid Application Development Tool as opposed to Visual Studio with the .NET framework 3.5 suppo...
I was verbally offered a job and the manager insisted that I start the day after the following day from the interview; so two days after the interview. I left the interview unsure of the offer the manager called me later that day and I agreed to take the position. At this point, I was told that I would get an offer let...
Now I have work with PHP and ASP.NET quite a bit and also played around few other language for web development. I am now at a point where need to start building a backend platform that will have the ability to support a large set of applications and I am trying to figure out which language I want to choose as my core ...
One thing I've learned from this website is that software developers are not treated the same as what I've seen in the companies I've worked at, and some of the differences seem to be related to the culture or other factors of the geographical location where the programmer works. In some areas, it seems like programme...
I have a good basic understanding of the fundamentals of C++, I also have an understanding of how recursion works too. I came across certain problems like the classic eight queens problem and solving a Sudoku with Backtracking. I realize that I'm quite lost when it comes to this, I can't seem to be able to get my mind ...
To give light to the situation: I am currently one of two programmers working in a small startup software company. Part of my job requires me to learn a Web development framework that I am not currently familiar with. I get paid by the hour. So the question is: Is it wholly ethical to spend multiple hours of the day re...
Let's say if I am doing desktop application, and I am interested to know whether our software really gets used or not. Is it alright to insert in code that tracks whether our software is used, for how long and so on? Note that no person-identifiable information will be collected, all I am interested to know is how freq...
I'm more at the novice end of the software developer spectrum, but nevertheless I've had exposure to quite a few programming languages and frameworks. From all the technologies I've used, I haven't found any with an API as well-structured and user-friendly as Java's. Why is this? Why is it that robust languages such as...
I'd like to offer a service where customers can write arbitrary java code, send it to me, and I'll run it for them on Amazon EC2. My question is: how can I do this without exposing one customer's data to another customer? Right now I'm thinking that each customer can be sandboxed as their own OS-level user with restri...
Whenever you want to return a value from a method, but whatever you return depends on some other value, you typically use branching: int calculateSomething() { if (a == b) { return x; } else { return y; } } Another way to write this is: int calculateSomething() { if (a == b) { return x; } retur...
Where the code is: function A() { lock() doSomething() unlock() } We can call A safely from multiple threads, but it never be executed in parallel . For parallel execution, we have to evade all of this code. But the problem is we never know the A is getting lock or not. If we have source code (maybe lucky ...
I've heard many times about the aspect-oriented programming, mostly that it is the "next generation" technology in programming and is going to 'kill' OOP. Is it right? Is OOP going to die or what can be reason for that?
Are there developpers out there, who (ab)use the CaptureScreenshot() function of their automated gui-tests to also create uptodate-screenshots for the userdocumentation? Background: Whithin the lifetime of an application, its gui-elements are constantly changing. It makes a lot of work to keep the userdocumentation up...
I want to improve my programming skills by studying famous open source projects, but I find it is easy to get lost by just jumping into their source code. So I decided to read their documentation about their design or architecture (such as UML diagrams) to get a general idea about their code's organization first. To my...
We're going to meet a potential new client today and between ourselves started discussing the need for a non-disclosure agreement (NDA) and whether we need one at this juncture. In this case we don't think we'll be talking about technical specifics as it's an initial meeting about who we are. Is there any precedent on...
We are developing a product which can be used for developing predictive models and the slicing and dicing of the data in order to provide BI. We are having two kind of data access requirements. For predictive modeling, we need to read data on daily basis and do it row by row. In this the normal SQL Server database is s...
I'm new to object-oriented programming, and one concept that has been taking me a while to grasp is immutability. I think the light bulb went off last night but I want to verify: When I come across statements that an immutable object cannot be changed, I'm puzzled because I can, for instance, do the following: NSStrin...
We have a need to FTP files that are generated by our system, so we're trying to decide whether we should spend the time to build something that meets our criteria (relatively easy, .NET has FTP functionality built in, among other more advanced libs from 3rd parties). Or if we should buy something off the shelf. Our re...
We're a small team of web developers currently using subversion but soon we're making a switch to github. I'm looking at different types of github workflows, and we're not sure if the whole forking concept in github for each developer is such a good idea for us. If we use forks, I understand each developer will have h...
I been contacted to do some work remote controlling LEDs displays over TCP/IP, but my experience and preparation is mostly about high-level programming language. I said that to the person who contact me about the work and he told me that: "if you call yourself a programmer you should know all these things" Should a...
Let's say there are two similar open source projects A and B, both licensed under the Apache Software License 2.0. I would like to contribute an improvement to both projects (because I don't know which one is administered better, and I would like to see my improvement show up in both). Is there a way I can contribute t...
I've just come across (for the 47 millionth time) some code that looks like this: except IOError, e: print "Problems reading file: %s." % filename sys.exit( 1 ) My first reaction is very visceral: the person who coded this is a complete idiot. How hard is it to print error messages to stderr and to include the s...
I'm currently toying with the idea of embarking on a project that far exceeds my current programming ability in a language I have very little real world experience in (C). Would it be valuable to prototype in a higher level language that I'm more familiar with (like Perl/Python/Ruby/C#) just so I can get the overall de...
I am a little experienced developer having approximately 5 years experience in PHP and somewhat less in Java, C# and trying to learn some Python nowadays. Since the start of my career as a programmer I have been told every now and then by fellow programmers that programming is suitable for a few early years of a career...
preamble> It seems to me that computer programmers are one of a select few groups of people who actually take pleasure from sitting in front of computers for long periods of time. Most people in other professions actively dislike their time at computers, and do their best to avoid it (so, I assume, they don't have prob...
I'm tutoring someone who can be described as a rank newcomer in C. Understandably, she does not know much about coding conventions generally practiced, and hence all her programs tend to use single letter vars, mismatched spacing/indentation and the like, making it very difficult to read/debug her endeavors. My questio...
I am tired of hearing people recommend that you should use only one thread per processor, while many programs use up to 100 per process! take for example some common programs vb.net ide uses about 25 thread when not debugging System uses about 100 chrome uses about 19 Avira uses more than about 50 Any time I post a th...
I am working on this project, which will soon contain loads of packages, projects etc. (Java). So, from the start I need to keep track of the high level package and class structure, monitor which class is being called where, so that I don't make it over complicated after 6 months. What is the right way to go about it? ...
Does anyone know or have information about which Software Development Life Cycle methodologies are used by Google?
I would like to learn how to write a software product definition. Therefore I am looking for online materials or books which would help me to learn more about this topic. I would like to learn, for starters: what must be included in such a document what must not to be included in such a document how to make a product ...
The company I work for recently purchased some third party libraries from a very well-known, established vendor. There is some fear among management that the possibility exists that our license to use the software could be revoked somehow. The example I'm hearing is of something like a patent issue; i.e. the company ...
As an independent, individual programmer: How do I let people very quickly know that I have not abandoned the software I've written and given away for free? That I am putting in the effort required to maintain and support my software to a professional level? When software written by one or two developers is available f...
I've been teaching myself a little LINQ and an exercise I thought would be useful was to take my existing Project Euler C# code, which I built using Test Driven Development and gradually convert it to LINQ. I realise that LINQ is not always the best solution for all of the Project Euler problems, but I don't want to ge...
I've just recently been on a project and during the release, we realized that it didn't work in Production. It works in all other environments but because we have a separate release team, and we cannot set up the servers and environments ourselves, we have no visibility of the configuration on them. We suspect that Pro...
I'm looking at the Creative Commons Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0) license. It says that I can use it for "non-commercial purposes". What does that mean? I see in Stack Exchange, under Network Profile there is that graph that tracks your points across your Stack Exchange accounts. It uses a contr...
So I've been working at this job for a couple of months. I'm a little frustrated because I do my best work from 2 to 7. In previous jobs, I've come in at 9:30-10:00 and leave at 7. Some companies have been okay with this, others have not. But my current company insists on my being there at 8:30. Any deviation from ...
I had planned to study and apply unit testing to my code, but after talking with my colleagues, some of them suggested to me that it's not necessary and it has a very little benefit. They also claim that only a few companies actually do unit testing with production software. I am curious how people have applied unit te...
Is is an absolute must when following the Scrum methodology to practice collective code ownership, instead of for example weak code ownership?