instruction
stringlengths
34
36.1k
I know C# pretty well (self-taught, sadly) and need to do some C++ programming for a Windows application. I have been able to find a ton of information for C++ developers learning C# but haven't been able to find much on learning C++ when you already know C#. Has anyone come across a good rundown of the basics? MSD...
Should I learn Lisp as my first programming language? I have no prior experience but have heard great things about it from programming friends.
I am interested in ultra high frequency trading and Java is the language I know best. I was always under the impression I would have to perfect my C++ skills in order to work within the ultra high frequency domain (no pun intended) because a lot of job specs seemed to ask for this. Elsewhere on the internet i have se...
I am working on a project in PHP that does a lot of input validation and can throw different custom exception classes in various layers of the application. To make the project code easier to read, I've displaced all the validation code into static methods of a validation class, which performs the check and throws the a...
Are there any specific reasons for a developer that deals with web applications (let's say writing html and js) to download a browser's source code (like Chromium) and learn how the engine works (renderer, javascript vm, network processing, etc.)?
I'm working on the UI-side of a project which is under intense scrutiny by our Marketing group. Most of the time, we're reviewing functionality requirements. Once in a while, however, they will get very in-depth regarding colors, styles, etc. For example, I've been tasked by Marketing to make one particular button a ...
I have been doing some research on developing on the Android platform and found that the only way to develop an app using C++ is using the NDK. I also came to know that the NDK has limited support to C/C++, with C++ having even lesser support than C. Here's the problem. I need to develop using C++ as I'm not very famil...
I am part of a development team that is relatively new to Scrum, suppose that at the end of the sprint a few large stories are either in progress or were not accepted by the PO. Firstly, what happens with those user stories? Do you just carry them over into the next sprint? If so, should they be re-estimated? In my vi...
I'm converting a procedural based site to an OOP design to allow more easily manageable code in the future and so far have created the following structure: /classes /templates index.php With these classes: ConnectDB Games System User User -Moderator User -Administrator In the index.php file I have code that detec...
I believe this is a little related with this question: How to be a zero-bug programmer?. But I believe this is more regarding clumsiness in programming because I know it is impossible to become a zero bug programmer. Often, I write a very buggy code caused by my own clumsiness. For example in writing a currency rate c...
I am looking for sorting algorithms that can work on a large amount of data, i.e. that can work even when the whole data set cannot be held in main memory at once. The only candidate that I have found up to now is merge sort: you can implement the algorithm in such a way that it scans your data set at each merge withou...
I'm aware of some general best practices when designing a database for an application, but what about redesigning? I'm on a team tasked with re-designing an internal business application, though despite me saying "internal," I'm unfortunately many, many layers of people away from contact with the actual users of the sy...
I've been tasked with creating a small web application, where users have a series of forms (I can't currently think of a better way of doing this) which will contain, either a)text input fields or b)drop down lists. The form will look as follows: form1 input box input box drop down box form2 input box input box drop do...
Given a 3rd party API with a very cumbersome object with many different responsibilities-- we decide to wrap using small, manageable, single-responsibility objects. This is the gateway pattern (I think). So any time you do this there is going to be some kind of "connection" where you have to connect to the resource. ...
I'm writing a code review process document for our team; we've never had a formal process in place although we do do some code review. I've found lots of articles talking about how important code review is, but I have one question in particular that I haven't found the answer to on the web... is the programmer part of ...
I know the concept of orthogonality, but from a programming language point of view, is there a way to verify/prove it? For instance in C#, one can use public or static for a method signature. You can use either or both and they wouldn't interfere with each other, so they are orthogonal to each other, right? My question...
I know a lot of software shops keep binaries under source control. However, our shop had come to store entire frameworks on the repository: DirectX runtime, CUDA, nVidia Optix, whatever. It is said to make a dev machine setup easier (supposedly, get latest and start coding). However, it considerably bloats the reposito...
If we look at typical implementation of a Class, we usually see the private members defined at the beginning and public( mostly functions and Accessors) defined towards the bottom. Now, is this a Industry standard agreed by a lot of people? How about keeping the private members towards the end as updates and additions ...
Currently, I'm following a course on embedded software development. The lecturer has chosen J as an architecture language for model-driven software development. J itself is a very terse programming language and one of his main arguments for this language is its terseness. For instance, this is a Quicksoft implementatio...
I'm currently in my placement year and working for a great software development company. It was always my intention of getting to this stage through university, getting enough academic experience as well as the year’s placement and then try to get a full time programming job without the need to finish my degree. I deci...
We have a web application that we want to start running regression tests on, and have pretty much decided that we will be using Selenium 2. Not all of the testers are programmer savvy. Is Selenium IDE usable for this? Which other recorder alternatives are best for Selenium 2?
We have a web application that we want to start running regression tests on, and one of the things I'm supposed to look for when choosing an alternative is a tool that has a recorder. However, I get the general feeling that it is frowned upon, and that writing tests in code is preferred. What are the eventual disadvant...
My idea of an enterprise app store is that there is a page on the company's website where all the apps that that company developed for its employees are listed so they can use them. And access to this apps is restriceted to the employees of the company. As far as I know you can download an Android App from any website ...
How are exception messages commonly stored? for any domain. I'm thinking about this from a maintenance standpoint. if(!Condition1) throw new Exception("Some exception"); if(!Condition2) throw new Exception("Some exception"); If it was decided that the exception message in that snippet needed to be changed, i...
Like many websites, we use email addresses as user identifiers for logins. RFC 5321 [#2.3.11] states that the local parts of email addresses: MUST be interpreted and assigned semantics only by the host specified in the domain part of the address This means that applications processing email addresses can't second gue...
I'm currently using Codebase for all my project management (where I'm learning Agile). I use it for tracking bugs, user stories (via tickets), wikis, files and git hosting. However, I'm looking to improve on this and find some tools better suited to things like bug tracking, managing stories, git hosting, collaboration...
We have a crawling engine that uses curl and caters to about 400,000 ppl / month. Although curl supports concurrent downloads, it does not support bandwidth limiting ( only in php 5.4.0 ) which is why my boss wants me to move to aria2. He also says Aria2 is faster ( which seems to be true to me as well ) Aria2 would r...
I have made an Asp.net MVC website and hosted it on a shared hosting provider. Since my website surrounds a very generic idea, it might have number of concurrent users sometime in future. So, I was thinking of a way to test my website for on-load performance. Like how will the site perform when 100 or 1000 users are on...
When dealing with a project that has many different files, I always seem to loose track of how the parts interact with one another. I've never really had much of a problem understanding smaller components in isolation, but as the complexity of the project increases, I find myself unable to mentally construct an underst...
Is a pointer pointing to 0x0000 the same as a pointer set to NULL? If NULL value is defined in the C language, then what location does it physically translate to? Is it the same as 0x0000. Where can I find more details about these concepts?
I have a sort of blog application that I'm working on for constrained writing. The posts have several types, and share some columns in common (title, body for instance), but they also have columns that they don't share in common. Please correct me if I'm wrong, but I feel like my two database design options are: Crea...
I am yet another Subversion user struggling to re-educate myself in the Tao of distributed version control. When using Subversion, I was a big fan of the project-minor approach, and, with most of my former employers, we would structure our repository branches; tags & trunk as follows: branches-+ +-personal-+ ...
So In my app, I have a bunch of images. And in order to keep the app size down, I could store those images on my serve, and just download and cache them as needed. But my question is, will that hurt user experience? Is it likely an iOS user won't have internet access while using my app?
By "enterprise ready" I am referring to availability of tools: dependency management, build management, message servers, databases, application platforms and servers, and are secure and scale well? For example, is there a lisp (or ML) alternative to j2ee? Please exclude FP's ported to JVM or .NET CLR. EDIT: I know tha...
Do web pages load faster or load slower when all headers, footers and basic functions are placed in external files and called using the statements below? Are there any other benefits to separating such content? <?php include("includes/functions.php"); ?> <?php include("includes/header.php"); ?> <?php re...
Is it considered bad practice to throw NotImplementedException for code you haven't written yet? Possibly TODO comments would be considered safer?
I've written a class that manages recipients on a MailChimp list, called MailChimpRecipient. It uses the MCAPI class, which is an third-party API wrapper. http://apidocs.mailchimp.com/api/1.3/ http://apidocs.mailchimp.com/api/downloads/ I pass the MCAPI object into the constructor of the MailChimpRecipient object, so I...
I've inherited a custom made authentication system that needs some refactoring. I'm not quite sure what the best way to split it up the password section and could use some help. The password class(es) need the following functionality: Check to see if a password conforms to restrictions. It needs to be able to provid...
What is the best way to ensure that programmers ask for help when they get stuck on a problem, rather than spending too much time trying to figure something out when they've hit a wall? I'm especially interested in how to optimize this with a distributed team. Some ideas that come to mind: pair programming co-locating...
As a digital security consultant when is it 'ok' to use tools someone else made (dumb to reinvent the wheel, right?) and when should I make my own?
I have recently become curious about open source licenses. I have a question about the LGPL. I created a Java web project and built it as a WAR package. Can I add LGPL jars to this WAR file?
My friend and I have started to try to collaborate on some projects. For background, I come from a PHP/Wordpress/Drupal coding background, but recently I've become more experienced with the RoR framework, while he is more experienced as an HTML/CSS designer, working with PHP and WordPress. We're both relatively new to...
Even though Ruby on Rails seems to be the most popular with the most job openings, is there a compelling employability reason to learn django for example? Maybe because everybody's learning RoR and there's a shortage of django developers in relation to the demand? Or is php along with a popular php framework the way ...
I am working on a Javascript Web App & I am finding as I expand the program & add new features(new animations) it causes existing features to break or work differently than prior to adding that new feature. So as I continue to finish the app, it keeps breaking old features & I have to go back & redo/update those featur...
I've read the article about fixing bug in this post What process do you normally use when attempting to debug a problem/issue/bug with your software?. One of the answer which I noted is "take a rest" when you have spent too long to try to fix the bug. I believe it is a good idea too. But sometime I am in a tight deadli...
I'm a growing programmer who's finally putting unit testing into practice for a library that I'm storing on GitHub. It occurred to me that I might include the test suites in the repo, but as I look around at other projects, the inclusion of tests seems hit-or-miss. Is this considered bad form? Is the idea that users ar...
I'm putting together a spec for a REST service, part of which will incorporate the ability to throttle users service-wide and on groups of, or on individual, resources. Equally, time-outs for these would be configurable per resource/group/service. I'm just looking through the HTTP 1.1 spec and trying to decide how I w...
A linked list can be used when you want cheap insertion and deletion of elements and when it doesn't matter that the elements aren't next to each other in memory. This is very abstract and I would like a concrete explanation of why a linked list should be used rather than an array. I'm not very experienced with program...
I forked a project that hasn't been maintained for a while now. I have a lot of changes I'd like to implement and want to actively maintain the project and keep it open source. How does the licensing work for situations like this? The original project is licensed under MIT and I would like to keep it that way. Would I ...
I got this question in one of the interviews I took. I started by explaining that it is like a set of rules that should be followed while moving resources around, but I did not feel convinced. Is there any other analogy or take on this question ?
Just going out on a limb here. Is doing a code review by sampling a few classes and units of code by a developer good enough to judge what he has done wrong to provide inputs? This is just in case you are pressed for time and can't review every single line written by them. I am working on the assumption that the develo...
I would like to ask members of the community about the role of Configuration Manager, as you see it. I'm not asking what Configuration Management is, as long it had been asked before. What I need to know is: What tasks do you think Configuration Manager should perform (or performs) in your team? What is primary respo...
I have a program which has a GUI and performs some very heavy mathematical computations for a couple of minutes and then outputs a result. When I try to directly interface it through its DLL's, it runs fine, but it doesn't run at 100% CPU usage like the GUI does. Why is this? I understand the reason why computational h...
Are there any substantiated recommendations how many testers a team should have per programmer? I'm more interested in opinions referring to an old-school development approach (no agile stuff) and larger projects. Sources are welcome.
We are introducing a master / slave replication schema in our web application. At certain scenarios we would prefer to explicitly direct reads to a slave and writes to the master, which to me is an obvious advantage of the schema. Instinctually, I'd prefer for the switch to happen somewhere in the ORM, we use Doctrine ...
Well, I've just started doing puzzles and it's so annoying to see puzzles which are easy to do but also need to handle very large numbers. That's the problem. Say I have to deal with numbers like 10 ^ 6 / 2147483647 / etc. Need to do arithmetic operations on! However, I feel that these shouldn't be handled in brute for...
I was reading through Oracle's introduction to OOP concepts and I came across this description: Real-world objects share two characteristics: They all have state and behavior. Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail). Software objects are conceptually similar to...
I know this is hard to answer without examples, so I'm looking for general principles or guidelines here. I'm thinking within the realm of small- to medium-sized mobile games and apps. I've read a few times the object reuse is a touchstone of creating efficient programs. So, I generally strive to reuse everything possi...
I'm trying to really understand how exactly a high-level language is converted into machine code and then executed by the cpu. I understand that the code is compiled into machine code, which is the low level code that a CPU can use. If I have an assignment statement say: x = x + 5; y = x - 3; Does the CPU execute each...
When searching the web for a solution to a particular problem, I often find a perfect solution posted on someone's blog, or in a public repository (GitHub, Google Code). Most of the time, the code has no copyright information, nor does the author mention any sort of attribution rules. I'm pretty sure short snippets ar...
I was discussing developing an iOS App with a client and I mentioned that we should ideally have a Universal App that would perform as an iPhone App on an iPhone and as an iPad App on an iPad. The client likes the idea of an iPad-specific version of the App but prefers the idea of a separate App entirely for the iPad ...
I am looking for a good way to rate the expertise in a particular programming language. The idea arose when I found the following article: Taking falsely all the credits? You don't know JavaScript. It lists, in a comprehensive way, language features and concepts of JavaScript. I wish there would be a list for every pro...
I talked myself into a hole at work, and I need some good ideas to help me better describe why we should include both Dojo and Knockout in our new web project. A little background: I do mostly computer-computer interactions when I program; updating states, reading/writing to the database -- Knockout is exactly where I ...
I am curious about the Google Closure Compiler. Why did they name it that? Does it have anything to do with lexical closures? EDIT: I tried researching it in the FAQ and documentation, as well as doing Google searches such as "closure compiler name". I couldn't find anything definite, hence the reason I am asking. I do...
It seems that as experience with the specific set of tools you have to work with grows, the incentive to try out new things weakens. When I was new at this programming job, trying out new things, researching online, made me more productive, because I often found a way (or library) that made the task easier that the cod...
So I have including the files to my projects by simply : #include "myheader.hpp" and adding the headers into the solution explorer. But recently I have realized that I may omit the step of adding the headers to the solution explorer because it does not change anything. The only important fact is to define proper includ...
I have two business classes: TimesheetDay and TimeSlot. One TimesheetDay can have one or more TimeSlots. The TimesheetDay and TimeSlot classes will be dependent on an object that implements a corresponding TimesheetDayData and TimeSlotData interface. That way, I can write data classes to map the objects to a MySQL data...
Almost all questions and information on both SO and "Google" describes how different licenses works and what license to choose for your work? But how do they work in reality. Almost everyone I have spoken to have vastly different thoughts of how they work, including hard core open source developers that gladly share t...
I am trying to learn creating apps for IPhone and IPad, apps like database oriented websites where user can save their data. I am a normal php programmer and use only Windows PC. Any good tips that you guys can suggest me to begin with would be highly appreciated. Thanks!
Quite a few of my friends want to have their own personal website to showcase their talents. However, they don't want to deal with such technical things as writing html and managing web server. Neither do I. It would be nice that we go to our URL and view our pages and we edit and update our information when logging i...
I'm in the process of designing the access control portion of a moderately complex application, but I feel like I'm re-discovering a lot of wheels. Does there exist a good overview of the "access control" domain, including terminology, discussion of the tradeoffs of different schemes (RBAC, ACL, ???), how it interacts ...
I am throwing this question out to the 'greater creativity' for some suggestions on search methodology that might solve this problem. I have come up with a somewhat contrived example to attempt to explain the problem well enough that some solution(s) might be recommended. The problem: We are using a relational DB (MSSQ...
I've been doing quite a lot of refactoring of C++ and C# code recently, and found that 90% of the patterns I use are: Template method Factory Singleton Are these generally the most commonly used patterns in refactoring or is it just me? Can you share your refactoring experiences?
It's unclear to me what the format is, if there's systematic/command-line requirements for creating it, etc. Basically, just to need to know the specs, and if there's technical steps for generating the README file.
I recently discovered Design by Contract (DbC) and I find it an extremely interesting way to write code. Among other things, it would seem to offer: Better documentation. Since the contract is the documentation, it's impossible for one to be out of date. Additionally, because the contract specifies exactly what a rout...
I've been thinking about an application that I want to develop for a while now. In short, I want this application to perform some crud operations. The application will be for a law firm so overall security is going to be very important. My primary programming language is php but I wouldn't mind learning some Java or po...
At my company, we have your typical svn structure. Each project has branches, tags and trunk. repo -Project A * trunk * branches * tags -Project B * trunk * branches * tags -Project C * trunk * branches * tags -Project D * trunk * branches * tags -Application 1 * trunk * branches * tags So Project A ...
In Javascript there are a few clearly prominent techniques for create and manage classes/namespaces in javascript. I am curious what situations warrant using one technique vs. the other. I want to pick one and stick with it moving forward. I write enterprise code that is maintained and shared across multiple teams, a...
I realize this sounds silly. Let me explain: I just came across this page about using CSS elements to create shapes- square, circle, triangle, star, yin-yang (yin-yang!), etc. using pseudo elements. Having struggled with HTML5 Canvas drawing in the past, I immediately thought that some combination of JavaScript and CS...
According to answers I've seen on stackoverflow, stored procedures (and to a lesser extent db functions) tend to perform better vs. LINQ + ORM frameworks (e.g. Entity Framework). I want to determine if the performance difference is large enough to justify an increase in development time, assuming it takes more time to...
I'm currently reviewing a system built by some developers that previously worked at my job. The system works pretty well from a user's point of view, but when delving into code review it's a utter mess. I'm more than convinced that the way the application is built won't hold up for future updates, let alone high increa...
I was recently assigned a task of managing a small project. The project has some technological aspects but the job is mainly doing managerial things: scheduling, making sure people do what they are suppose to, going to a lot of meetings, etc. Basically, it's not how the average programmer or even a team leader would li...
I am dealing around with C# .Net for almost around a year now. I got lots of experience (I owe most of it to guys at stackoverflow). Now I am thinking to start working with C++ as well. Mainly because I would like to be able write codes resulting in applications that are not .Net dependent so they can be executed in mo...
I was building an application in .Net for almost a year (almost alone), I took the decision to build it with a 3-layer design. Recently when finished the project, I analyzed if the effort of creating this application with layer design in mind really compensate for the "benefits" obtained implementing such design. Out o...
According to this article from the BBC and this post on Microsoft's Exploring IE Blog, Microsoft has planned to automatically upgrade Windows XP, Windows Vista, and Windows 7's IE to the latest version. Microsoft has stated that they will also allow people to opt-out of this update through the use of the The Internet E...
I'm a PHP developer who started with CodeIgniter. In it, designing models was easy: it seemed like each method defined in models was the equivalent of static methods in a normal, objected-oriented environment. I tried FuelPHP, which has an built-in active record style ORM, and PHP ActiveRecord to use with CodeIgniter. ...
I have "logic engine" which executes set of user configured steps. These steps are saved in the database as "Step" entities. The engine gets the first step and then executes steps until there are no more steps to execute: public void Execute(details, data, Step firstStep) { var step = firstStep; while (null != ...
We need to do some user documentation for a product we have been working on for the past few sprints. We are now starting a new project in the next sprint and the PO is making the documentation for the product produced previously a User story for this sprint. I am just wondering your opinion on this approach. Personall...
It's 2012! Mercurial and Git are both still strong. I understand the trade-offs of both. I also understand everyone has some sort of preference for one or the other. That's fine. I'm looking for some information on level of usage of both. For example, on stackoverflow.com, searching for Git gets you 12000 hits, Mercuri...
I'm building an app that I think would benefit from the use of MySQL stored procedures. I know stored procedures have a bad reputation, but I think they suit my application well. Using stored procedures would reduce the number of queries per request significantly (mostly inserts), as well as allow me to leverage the pr...
I have two books geared toward learning JSP. From what I've read, one motivating feature/benefit is that it is easier for web designers (they apparently don't, as a rule, know Java) to work with dynamic pages via EL/JSTL. From what I've seen so far, learning EL/JSTL requires a basic understanding of Java. I have yet to...
I have an interview coming up soon next week and there's a few things on their list of responsibilties for this software development job (the job position title is vague, it says java developer) that I am worried about: Unit test features Debug new features Provide recommendation on test case design (what is this?) I...
How does one prevent users from creating erroneous input sets, when there is no practical way to vet the input? The scene I modify a small ERP package written in Visual FoxPro. One part of the package concerns itself with printing truck manifests and invoices to be sent with the drivers on their delivery routes. The ...
I have an interview for a C++ internship position. Now, the thing is I've taken two out of three quarters of the basic CS classes (in C++) at my community college and we covered the basics up to arrays, pointers, linked lists, recursion, etc (basically all of Walter Savitch's Absolute C++ book). I spoke to the intervi...
The problem I have, is that most of the C++ books I read spend almost forever on syntax and the basics of the language, e.g. for and loops while, arrays, lists, pointers, etc. But they never seem to build anything that is simple enough to use for learning, yet practical enough to get you to understand the philosophy an...
I've recently started to work on some iPhone apps, starting from a base where I had essentially no programming experience (I studied Maths & had very few programming modules) I worked my way through Beginning Mac Programming: Develop with Objective-C and Cocoa and found it useful, while it gave me the feeling that I ne...
When I began to use parser combinators my first reaction was a sense of liberation from what felt like an artificial distinction between parsing and lexing. All of a sudden everything was just parsing! However, I recently came across this posting on codereview.stackexchange illustrating someone reinstating this distin...
I'm having trouble determining what I might put in the body of a response to an OPTIONS request? are there conventions? standards? What do you put? do you just provide a list of other METHODS? should you give the representation?
Web developers code in a minimum of four languages (HTML, CSS, JavaScript, and a server-side language), must produce a working result in several different browser implementations, and may work on the top of a custom software stack that they don't control. How should a code review take these things into account? Should...
I'm a first-year PhD student in Ireland. My background is in mathematics, though I'm going to stream my career into programming with Python, Java and C++ languages. I have some good experience with C++ what allowed me to have a presentation in Europe quite recently - I participated in an open-source cloud computing pro...