instruction
stringlengths
34
19.9k
I have a scripting engine I just published as an open source project. It's been sitting on my harddrive waiting for about a year. My engine of course isn't complete in any way, but it does work for simple scripts. It has a javascript-ish feel to it, but I don't wish to abide by the ECMA spec or anything. Now, the big ...
I have the following situation: I have to create a website and a web service that will share a part of the functionalities. This is why I do not want to write code twice. I have thought of the following architecture: MyApp.BusinessLogic --> here we save the DataModels to the database MyApp.DataAccess -> DataModels & En...
I have a database having around 15 tables.Currently I am working on a report generation page, which is having 16 criteria.The values are distributed among multiple tables.User can select any number of search criteria. The problem is, if the user is entering 2-3 values, it is better to filter first by certain value and ...
I am doing an internship on Big Data technologies so I am new to this area. My question is about the use of NoSQL in the Big Data architecture. Do we need always to use a distributed storage (like HDFS in the case of Hadoop) then to put on top a NoSQL databases (like Hbase )? I find it difficult to understand the typic...
I'm creating an application which needs to have a key file based product activation. If a user purchases the application, the key file may have to be attached to the application EXE file dynamically (may be online) and package it to an MSI installer. The user downloads the application from a server or repository. How c...
In a lot of examples for the Azure platform I'm seeing a lot of self-administration happening: an application will test for the presence of an external system such as a queue or database and create the necessary structures it needs to function. This behaviour seems contrary to a more traditional application's environme...
I've been taught since high school that defining variables like this: int _a; or int __a; should be consider bad practice because this would eventually puzzle compilers that use variables starting with an underscore to name temporary variables. As far as I know this is the reason why some people like to move the unde...
I have seen on some sites which say ,for-example, multiple votes/views from same computer will be neglected/penalized etc. For-example liking a facebook page, or youtube video from same computer(different accounts) will not increase its worth(according to my knowledge). How do these sites identify bogus votes? I just n...
When I learned relational databases, the prof said that one would "almost always" want an artificial int as the primary key in a table, but did not specify what the exceptions are. At some time I stopped using them for junction tables, and never had a problem. Now I am making a database with a lot of lookup tables, an...
I've been working in a very small team for PHP development and we've been using an ad-hoc, "Invented Here" style guide. Now that our team and codebase is growing, we would like to use a more broadly-used style guide that would be, if not an official standard, a de facto standards used in many PHP communities. Does such...
I have a fair number of items in a session, and I am wondering if there are any advantages to copying the session variable to a normal php variable (in order to close the session file as quickly as possible) and then do any calls from there. Something like: session_start(); $copiedSession = $_SESSION; session_write_clo...
I'm learning programming in Objective-C and I can't understand what a static method is. I know what class/instance/private/public methods are. Can someone explain what it is using an example and comparing it to the others I mentioned? And in what situation would someone use it? From what I read on Wikipedia, it soun...
First, some context (stuff that most of you know anyway): Every popular programming language has a clear evolution, most of the time marked by its version: you have Java 5, 6, 7 etc., PHP 5.1, 5.2, 5.3 etc. Releasing a new version makes new APIs available, fixes bugs, adds new features, new frameworks etc. So all in al...
I have just released an iOS app for beta-testing with TestFlight. I'm wondering what is good practice during beta-testing? Should I halt development of the app during beta-testing? Should I continue developing but make a snapshot image of what the code looked like when it was released for beta-testing? Issues that cou...
A colleague and I have been taking turns debating/discussing the issues/merits of integrating a version derived from the current git repository into our code whenever it builds. We think the merits include: No need to worry about human error in updating a version number Traceability between what we find in a device an...
I know exception handling is a topic often discussed in the world of Java. I've read a few threads on here and SO as well. https://stackoverflow.com/questions/2169339/exception-handling-in-a-java-web-application I find myself identifying with principles such as Do not suppress or ignore exceptions, Do not catch top-...
My organization does web projects and employs a handful of disciplines like backend dev, frontend, BA, UX, graphic design, QA. We've been pushing to have tasks for every discipline in our sprints with explicit dependencies (Can't build a page without comps, can't do comps without wires, etc). I've heard some other orga...
Hi I had today my first interview for a position of android developer.In my portfolio I had a php e-commerce application that has a catalog , ajax powered shopping cart , and administrator functionality. Because my Android knowledge is prety limited , I only started learning about 3 weeks ago , I was asked to migrate ...
I am developing an Android application for my final year project which allows the holder of a mobile device to receive a text notification containing potentially sensitive information from a server. My question is this, if a User downloads the application, what is a suitable way for them to create an account / log in o...
https://stackoverflow.com/questions/98734/what-is-separation-of-concerns In computer science, separation of concerns (SoC) is the process of breaking a computer program into distinct features that overlap in functionality as little as possible. A concern is any piece of interest or focus in a program. Typically,...
I was recently talking with a recruiter who wants to put me at a company for a position of Developer in Test. He essentially made it sound like a position where you get to fiddle with new programming techniques and test bugs and improvements in software but where you don't need to worry about standard deadlines. You ge...
I have created web services before that are used by a small number of users but have a new project that would have lots of users. For each user that uses the services, this is what they would do: 1) Call a method on the web service that calculates a "price" based on parameters passed by the user. 2) The actual method a...
I have an event(s) controller: class Event extends CI_Controller{ public function index(){ } public function foo(){ } //Shouldn't be able to use this method unless logged in public function bar(){ } } And I'm trying to organise my code so it's fairly tidy and straightforward. Just now I have ...
I am currently building a website, which until quite recently was purely PHP. However I am now making trying to have the site use more AJAX, to lessen the page reloads. In PHP I had a lovely object orientated user class with methods for updating data, logging out, and so on. When a user logs on this would be stored as ...
To me, it seems as though "mainframe" is a somewhat dated term; is it simply an older synonym of "server," or does it server a purpose more similar to a cluster/supercomputer?
I pulled the term smurf naming from here (number 21). To save anyone not familiar the trouble, Smurf naming is the act of prefixing a bunch of related classes, variables, etc with a common prefix so you end up with "a SmurfAccountView passes a SmurfAccountDTO to the SmurfAccountController", etc. The solution I've gener...
I'm in the process of implementing a programming language on top of LLVM. For my polymorphic system, I'm looking for suggestions for a ultra-fast dictionary. I am not concerned with insert time, as these maps are only written to a dozen times or so. But I'm looking for super fast lookup. I did some research on the ope...
Have you ever had this feeling that your code is bad, the whole project is a mess, and you just want to step off? On your daily job you can explain this feeling away with your coworkers, asshole boss, or something like this. But with side/pet projects there is really no excuse. For example I'm currently maintaining my ...
What are the common terminology used to schedule software update and support. For example, I really have no clue how releases and updates differ, how often are updates released (not everyday I hope)? Most importantly communicating stuff like milestone (what is this mean?), roadmaps, basically I want to know how I can o...
I know there are different ways to combine programming languages (Haskell's FFI, Boost with C++ and Python, etc...). I have an odd interest in combining programming languages; however, I have only found it "necessary" once (I didn't want to rewrite some older code). Also, I notice that this interest is shared (there ar...
My university lists the rotation of courses each semester/year. Therefore, it is possible to predict when every class will be taught. I am trying to create a JavaScript (language is irrelevant, really) program that will have the user select all the courses they would like to take, for how many semesters, and the max (o...
I am developing a small application which I want to make open source. Currently only my work is on the application, and so in all the files I have put up a copyright notice in my name. Now when I make the project open source and say a developer Sam does some enhancements to some existing files. Then should he be allowe...
Bug tracker for any decent sized project seem like a bit of a no-brainer to me - it makes it really easy to organise hundreds or thousands issues, without issues colliding or getting mixed up. So when I see some really big projects, like Git, using a mailing list as the main method of coordinating maintenance and devel...
The scope: it is part of a big ERP system which provides specific calculations. One can think of it as a salary calculation module in a CRM. Yet this is way beyond that in both complexity and integration points. Thus, there are a lot of technological debt, but not unmaintanable one. There some some unit/integration tes...
I have a generic design question that relates to enterprise applications but I think that software developers from other types of projects may have experience with this as well. The scenario is following - you have a database and you are about to write an application that provides access to its data. The database also ...
A question has been bothering me for a while: when developing international projects, it is common sense to use English as the reference language since it is the language that the most people understand. However, how can one choose to name a function when it could have different valid English spellings. For example, wo...
I am new to unit testing, I've one REST web method that just calls DB and populates a DTO. Pseudo code is public object GetCustomer(int id) { CustomerDTO objCust = //get from DB return objCust; } My doubt is how to write tests for these methods and type of tests (Integration/Unit) to be included. And for unit test...
I am just a graduate from India and I have knowledge of Java, JSP and Servlets, Android application development and some iOS development. I do not have a background in C or C++ and a little weak background in Data Structures and Algorithms. I want to know whether I can make a successful career in the IT industry withou...
I am working on one of my first projects in C (microcontroller code) which is split up into multiple C files. I noticed some inconsistency in my coding where I had some variables declared as extern global variables and would just access them directly (ISR and some other places), and others declared static global variab...
A typical MVP application might have a View method such as: void setDisplayItems(List<DisplayItem> items); Should the Presenter sort the list of items or is that a task for the view? I feel this might be a task for the View, for two reasons: If it were a task for the Presenter, then methods such as: void addDisplayIt...
I have a question regarding ASP sections and partial views. What ser the benefit of using one over another? Because if I have a menu, i guest that it could be both as a section, but also as a partial view. So what is the difference?
I would like some input on how to handle clients and third party vendors that ask me about the deficiencies in my design. For example. It turns out I need a data field in a webservices response. This response has been signed off on weeks ago and I get questions like "Why haven't you identified this field X weeks ago?"....
New to C++! So I was reading this: http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/ Header guards Because header files can include other header files, it is possible to end up in the situation where a header file gets included multiple times. So we make preprocessor directives to avoid t...
I am creating the model part of an MVC architecture. My one class will provide all the accesses to allow one to fetch system state. I want most of this state to be immutable as it shouldn't be changed and I don't want anyone accessing my model to be able to break the state by making a foolish change. However, The obj...
Just read a presentation about using Python for Scientific Computing. I am currently using MATLAB (student license FTW, which will expire when I graduate soon). So I was wondering how matured SciPy and NumPy are with respect to relying on them for all the Scientific Computing I need to do. The advantage is that it's fr...
We are a small team that is about to start developing a localized version of a successful US web app in Korea, using RoR. Our question is: What process would you recommend we use to go about developing the app? Should we start with the data models? The views in HTML and then code them? Take a single feature, develop it...
My company is considering consolidating all their tier-1 (i.e. top end production) applications and sites into one all-encompassing code base. The theory is that their permissions, design and overall functionality can be homogenised and centrally managed. I have no end of concerns about this approach since the data str...
The dynamically typed languages I know never let the developers specify the types of variables, or at least have a very limited support for that. JavaScript, for example, doesn't provide any mechanism to enforce types of variables when it is convenient to do so. PHP let you specify some types of method arguments, but t...
I'm a developer who mostly does web stuff in ruby and C#. I'd like to start tinkering with iOS and Mac development. Over the last few month i've been trying to get fluent in one set of key bindings (vi / vim because it just feels right). I have the awesome ViEmu installed for visual studio on windows which gives me a t...
The last couple of years I've been observing an exponential growth in the news related IT companies and individuals taking their cases to court, on one side, and the questions concerning legal matters everywhere on the web, on the other side. I very much doubt people and companies have suddenly started stealing each ot...
Why issue tracker systems usually have distinct "Opened" and "Reopened" statuses?
I am wondering if there is any research on the lifespan of cookies on users computers? For a website I'm building we are looking at giving the users some personalization based on a previous selection when they come back at a later point. However, our users mostly will come back a few months or even a year later. Of cou...
Learning to manage stress is vital to staying healthy while working at any job. A necessary subtask is learning to recognize and limit the sources of stress. But, in the midst of the daily grind, it can be difficult to recognize sources of stress (especially for an intense, focused persona such as a programmer). What t...
I'm sure everyone has experienced something like this. You go into a meeting with a client who has a project. They have no/few requirements in mind and the vaguest understanding of what they want/need. At this point, there seem to be two options: 1) Tell the users, "Ok, so I can't build something for you if you cannot ...
We're a bunch(4-5) of 3nd year college students about to begin our 3 months summer vacation and we would like to get going on a project. We want to make a game with XNA, it doesn't have to be big or something but we have 3 months so I'm not sure how big it can get. I plan on being the "team leader" because I have the m...
See UML colors here. Here is the example, I have following entity classes: User(name) MailBox(owner: User, label) Mail(from: User, to: User, subject, body, composeTime) MailCopy(type, from: User, to: User, subject, body) MailDelivery(mailCopy, mailBox) Use case: Every users have three mailboxes by default: MailBox...
There are a two main codebase structures that I have seen when it comes to MVC frameworks. The problem is that they both seem to have an organisational bug that goes with them. Standard MVC /controller /model /view Problem: No separation of related components (forum, blog, user, etc..) Modular MVC /blog /controlle...
Here's my question: What are the weaknesses with different types of NoSQL databases? Specifically, what're the weaknesses of key-value stores, graph data stores and document stores? I've had an easy time finding strengths, but documents on weaknesses seem to be scarcer. Edit: In comparison to each other, and to relati...
I'm new to programming. I know a little python and a little objective c, and I've been going through tutorials for each. Then it occurred to me, I need to know which language is more flexible (python, obj c, something else) for screen scraping a website for content. What do I mean by "flexible"? Well, ideally, I need s...
In the Ruby on Rails tutorial, I read something that suggested that experienced developers do not use scaffolding since they tend to like to just write the code to connect the MVC on their own. In a different place I read that it is a good idea to use scaffolding because it helps you stick to convention so others who l...
If this has already been asked, feel free to redirect me and I'll close this. I gave my current employer notice to quit my job a few months ago, and they haven't been able to find anyone to replace me. I'm able to leave the job in another month, and the company has started to ask me if I'd be willing to continue workin...
I often see in C and C++ code the following convention: some_type val; val = something; some_type *ptr = NULL; ptr = &something_else; instead of some_type val = something; some_type *ptr = &something_else; I initially assumed that this was a habit left over from the days when you had to declare all local variables ...
I've just read this page http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx One of the things they did was to convert the arabic date to the arabic calendar. I'm wondering if it is a good idea at all to do so. Will it actually be annoying/confusing for the user (even if th...
So I am in the middle of making (and maintaining) my own code library with quick snippets to make life easier. I'm assuming a lot of other people do this to help. My question is, what sort of things do you store in this so called library Also, Do you use any tools to organise this library?
I was reading the article here: http://www.paulgraham.com/avg.html and the part about the "blub paradox" was particularly interesting. As someone who mainly codes in c++ but has exposure to other languages (mostly Haskell) I'm aware of a few useful things in these languages that are hard to replicate in c++. The questi...
I'm a coder and have experience with both native and managed code. I started out with Pascal and C, then moved into C++ and eventually into C#. Over the last year or so, I've been coding almost exclusively in C# and have lost a lot of what used to come naturally when I was a C++ coder. A few weeks ago when I sat down t...
I provide a web service using a site and recently I got a proposal for franchising that service to another company. The problems come when they want all my code to run in their servers. I understand their reasons, but I want to take measures that the core of my PHP code remains hidden and unchanged. I want to take meas...
There are a lot of android resources types: layouts, strings, drawables and so on. I understand that readability of it's names is important but can not create a table of rules how to name them in the best way. Are there any best practices on that?
C# (and the .NET platform in general) is looking like it's becoming a good option form multi-targeting applications: official Microsoft .NET framework: full-blow Windows development, ASP.NET development, Windows Phone development, etc. Mono and all its derivatives: MonoTouch, MonoDroid: the rest of the world. These t...
We are having a discussion about design. Keep into account this is fortran, so we can't be too smart. We have the following classes: Application, System, Calculator, CalculatorSimple, CalculatorPeriodic, Result. Application is an application object which handles System objects. In order to compute information on the Sy...
Jame Gosling said “You should avoid implementation inheritance whenever possible.” and instead, use interface inheritance. But why? How can we avoid inheriting the structure of an object using the keyword "extends", and at the same time make our code Object Oriented? Could someone please give an Object Oriented exam...
I'm looking into Lab Management right now for our test environment for manual and automated testing. I'm just getting started on the process of putting together various servers to host/support it and then I'll be making some dummy projects and working through the process. Currently, we are using System Center Virtual M...
When I first started programming, I assumed that I would one day get to the point where I would start a project by sitting down and sketching a UML diagram of all the classes, then pretty much stick to that. I have now been programming for a couple years and it is not turning out that way. As I go through a project, I ...
I was recently made the team leader of a database (95% MS SQL Server, 5% misc-Oracle, Sybase, Access) development team that manages and develops a large number of databases in a corporate environment. I'm looking for resources (checklists, utilities, best practices, procedures, websites, books, etc) that will help me ...
In OOP there is the Open/Closed principle that states that "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification". Taking in consideration that in Ruby it is to possible to reopen a class, don't you think that this breaks the Open/Closed principle? When do ...
A common question in Tech Interview is to design a particular system, usually an existing product of the company. For example, "Design Google Docs". What is the expected answer for such a question? I mean, such systems surely have a complex design which is beyond the scope of any interview. What are the interviewers ex...
This is more a web design / user experience question, but since programmers.stackexchange.com is more opinion based, I posted this here - Does it make sense to have a single tab in a web app? I don't see any reason to have a tab if you can't tab to it from some other tab. My PM is demanding a single tab. I honestly ...
Tools and frameworks make complex tasks simple. This seems like something that would be supported by KISS(keep it simple stupid). Tools and frameworks also have the potential to introduce leaky layers of abstraction, where the complexity of the issues are far more problematic than anything you would have written yourse...
In order to produce a plug in and incorporate it (merge) easily with Visual Studio 2010. I was wondering which language was used by Microsoft to create it? In order to offer our product to Microsoft, we must know which language is better to integrate with Visual Studio. Was it pure C++? A friend of mine told me it was...
I've heard a lot of buzz about the Iron languages.. I mostly write line of business applications in c# and I'm not really enjoying c# these days. Is IronRuby mature and fast enough to be used in silverlight right now? As in am I gonna get a call in the middle of the night from an angry customer cause the silverlight ap...
I will soon begin the process of applying for entry level programming positions. As of now I have no professional coding experience, so all I have to show is some personal projects and code samples to show what I am capable of. How do I present such things as code samples, my specific work on collaborative projects, pe...
Not sure if the title really fits with the question, but figured it was the closest to give an overview of my question.. I'm working on a web application that (fairly heavily) employs the use of browser-specific CSS functions such as -moz-transform) and I'm curious as to what approach those with more experience develop...
Many questions and answers on the C/C++ pages, specifically or indirectly discuss micro performance issues (such is the overhead of an indirect vs direct vs inline function), or using an O(N2) vs O(NlogN) algorithm on a 100 item list. I always code with no concern about micro performance, and little concern about macro...
I worked in Linux environment before and I have to work in windows XP for my current project. In linux, I enjoyed using script files for automating tasks(even smaller ones), and it did save me a lot of time. I see windows command prompt is severely handicapped in terms of power and the number of commands available. I ...
I work in a shop that lives by its CI process. We have traditionally used SVN and are considering moving to git (want to leverage its ease of branching, stashing, etc). Thinking in terms that a distributed source control system, by its very nature, seems to put the need for a central repository as a secondary concern...
I have a number of user stories where the same feature needs to be shared by multiple roles. I have started writing these stories like this: As a Role-A or a Role-B When I perform Action-X Event-Y should occure. Is this the correct way to represent that concept in user stories, or should I break it up into one stor...
I'm coding a new site. İt's like StackExchange, a social site and a blog. I try to create a multi-language site, however I can't decide how to do it. I have to use modules, so I must use OOP, while having multilanguage interface. How can I do that? There are two language options (Turkish and English), used continuousl...
Suppose I release some source code under the new BSD license. Is it allowed for someone else to take this code, make modifications to it and distribute it under the terms of the GPL? From Wikipedia: Many of the most common free software licenses, such as the original MIT/X license, BSD licenses (in the current 2...
I have 1 year and 6 months of experience on Android. All of my experience has been into application development. Recently I have got offers from two companies. One is offering me a profile to work on application layer and other is offering a profile on Android middleware. Can you guide me which would be better? Is mid...
Let preface this by saying that I understand that any advice I may receive is not to be taken as 100% correct, I am just looking for what people's understand of what this license is. I have been looking for a library that allow be to deal with archived compressed files (like zip files) and so far the best one I have fo...
I have a Django model called Entity. Different types of Entity have different attributes (e.g. some have a currency associated with them, others don't). I'd rather not have to create a new subclass for every permutation of attributes. Question: Is it a bad design decision to create a CharField or TextField called "attr...
I was looking at some certifications that can potentially enhance my knowledge and market value as a Software Engineer. IEEE's Certified Software Development Professional (CSDP) caught my attention. When I looked on the net for any user experiences with it I couldn't find anything substantial. Doesn't seem too popular....
Every time I check out a web page dedicated to some programming language I always see the word "powerful" in the list of idiosyncrasies / attributes. If every programming language is powerful why do they put that word in the tutorials / documentations?
A key issue with mainframes is that the cohort of supporting programmers is dwindling. While normally this wouldn't be a problem in that a falling supply of programmers would be offset by an increasing amount of salary those causing a rising supply of programmers via the law of supply and demand, I'm not sure this is r...
I work at a company that only uses stored procedures for all data access, which makes it very annoying to keep our local databases in sync as every commit we have to run new procs. I have used some basic ORMs in the past and I find the experience much better and cleaner. I'd like to suggest to the development manager...
What makes the web application perform and scale better is always a big topic. And finding the performance problems and tuning them is another... Here is some my thoughts of how to "finding" performance problems: For a "new" api/application or other Analzying the detail api and then preparing the Jmeter/Grinder testi...
I like the small iterations. I like the unit tests. I like code review. What I don't like is the starting off with little or no documentation. Am I alone in this? Do I simply have a misunderstanding of the process? Any thoughts would be appreciated.
The Lean Software and System Consortium 2011 conference, which took place last week, stated the vision and values of lean software development. Here are the six values of lean software development as photographed by one of the attendees. Number 1 is "accept the human condition." While I can sense the humanistic and may...
After many years of coding, trying various programming styles, weeding out unreadable or impractical stuff, I still can't figure out one thing: what is the best way to single-line-comment multiple lines of indented code. 1. setup_checkpoint(); // if (object->looks_suspicious()) // guard->full_body_scan(ob...
Alright, so my situation is as follows: 1 Front End Developer 2 Back End Developers 1 QA Tester We all currently have Virtual Machines, or Second PC's set up with our windows environments to test. Now, the real issue is our Windows Environments expire. We're now running into points where randomly parts of our team fo...