instruction
stringlengths
34
36.1k
Sorry, I'd be happy to have someone improve the title of this question. What are the benefits and downsides of "positively formulated" logic vs. having it "english readable". I'm looking for a generic position that can be placed into code guidelines. Examples of what I see as "positively formulated" logic if ($obj->isV...
I had a discussion with a coworker today, whether usage of using the Java operator instanceof is a kind of reflection. And the discussion quickly evolved into what actually defines reflection. So, what is the definition of reflection? And is the usage of instanceof considered "using reflection" ? And in addition, if in...
If it's wiser to know a framework such as jQuery, MooTools, DoJo, etc. to get over cross-browser issues, why are interviews asking for only javascript?
I'm currently evaluating which license to use for my next OS project, and things are getting more and more interesting after I decided that I really want to understand what the licenses mean. Up until now, I just licensed everything under MIT because I like the MIT and their license is nice and short. And probably beca...
I'm in the middle of co-producing a "development approach" document for off-shore resources as they ramp up onto our project. The most recent (similar) document our company has used is over 80 pages, and that does not include coding standards/conventions documents. My concern is that this document will not be consumabl...
Is it a good practice to write comments for widely known methods like equals, compareTo etc? Consider the below code. /** * This method compares the equality of the current object with the object of same type */ @Override public boolean equals(Object obj) { //code for equals } My company...
I'm setting up a web app in which people will upload images. Once uploaded the images will be watermarked then resized multiple times (Thumbnails, different sizes etc.) and finally uploaded to Amazon S3 for storage. The web app is written in Python with the Tornado framework, I don't really want to lock up the Tornado ...
Given a small project that aims to add new functionality to application, the changes introduced touch some existing code, involving updating these in certain areas. During implementation, I've found some of these code which were updated have candidates for refactoring. Is this an appropriate time to refactor which in ...
Given that the reviewer is not part of the project, but was assigned to review because he has done some coding for the application being updated/enhanced. Is it the reviewer's job to ensure that the requirement is complete and correct? Or is this the QA and business tester's responsibility? If the developer and the r...
I have my undergraduate final year project coming up and am very interested in lexers, parsers, compilers and so on. I would like to use the DLR (.NET 4.0 dynamic language runtime) for my undergraduate final year project, but am struggling to find a reason to use it! A domain specific language would be an idea, but mos...
Functional languages, by definition, should not maintain state variables. Why, then, do Haskell, Clojure, and others provide software transactional memory (STM) implementations? Is there a conflict between two approaches?
I'm currently working on a Silverlight app using Caliburn.Micro. At present, we have Views (eg: PeopleView) and View Models (eg: PeopleViewModel) that equate to 'pages' of the application. PeopleView might contain a ListBox ("People") which is bound to an ObservableCollection of Person objects, and has an ItemTemplate ...
The dictionary defines artifact as: artefact, artifact [ˈɑːtɪˌfækt] n something made or given shape by man, such as a tool or a work of art, esp an object of archaeological interest anything man-made, such as a spurious experimental result (Life Sciences & Allied Applications / Biology) Cytology a structure seen in...
TL;DR: What header/footer do you put on your Functional&Technical specifications to avoid people having different versions at meetings? Story: We're have a lot of documents, being changed by everyone. Functional specifications, technical specifications, addendums, etcetera. Problem is offcourse that during a meeting, a...
Are there any design patterns to compose views within a parent view during runtime? Say we are composing the views in a workflow tab and views in the tabcontrol depend on the country, store type and/or other conditions. This is a MVP, WPF, PRISM application.
I feel weird when I'm editing code in an IDE that does not have line numbers in the text editor. The questions I have are: Are line numbers visually excessive, particularly when a find by line function exists in your IDE of choice? What are the uses of showing line numbers?
I'm having problems naming my classes and services correctly when utils and other help classes are involved. How would you structure the following: EventService.cs EventServiceUtils.cs EventServiceValidators.cs EventServiceCoordinator.cs etc... I have multiple services with the same needs as the above service. One tho...
I've been wondering if one can still classify a Waterfall type development approach, where the length of the waterfall cycle is 1-2 weeks, as Agile.
I decided to do a mini-project by myself to help me understand a bit more about developing web applications before starting the new university semester. Using the Java SE and JEE/J2EE platforms. I will be creating a simple web application that will retrieve data from a database and display the data. I decided to use a ...
What is the best practice for managing references in a .NET open source project? I'm writing a small library that will use Json.NET. Should I check the Json.NET DLL straight into source control?
Our organization is considering integrating unit testing into our software development workflow. I've heard lots of anecdotal stories about how it encourages better, easy to maintain, and well-planned code. As a programmer, I understand the benefits. However, in order to build consensus around using unit testing in pro...
Working with C++. Suppose I have a class BoxFilter. The class is used to filter boxes which have properties such as height, width, depth, weight, etc. The filter might have something like MaxWidth so that boxes with a width greater than MaxWidth would not pass the filter. Usage would be something like (C#-style pse...
When asking an interview candidate to write a program on the whiteboard, do you expect the candidate to write code that is syntactically correct? I had two candidates, one of which wrote a syntactically correct program but the logic was not up to the mark, and the other had the logic better written but the syntax was c...
There are advantages in holding daily scrum, like: Team get coordinated with each other Everyone knows what amount of task has been done Burndown chart gets more and more complete Task board is updated It doesn't last that much, 15 minutes won't kill anybody However, recently (after 6 months of implementing and usin...
I have to explain to some students the use of abstract classes and interfaces, as I have a very tecnical background, I would like to know if you would help me to define an easy explanation for junior. Simple definition: What are the purposes of abstract classes, interfaces, and what is the difference between the two ? ...
I've had this happen in all sorts of software products: You purchase a software product, download it, install it, and then after the install, the program immediately begins downloading an update or a patch. Ideally, I would imagine that the download package would somehow be linked to the product's repository so that s...
can someone suggest me the current problems in software engineering and the research links for it? i have some knowledge on MVVM being a pattern but i would like to know more about others and also current problems as to why people go for the patterns and how they help and what are still current problems involved and th...
I'm making a syllabus to teach non-programmer co-workers PowerShell. The first non-pilot group I will run the course with will be a team that deploys and configures one of our software products. They are bright intelligent motivated IT workers, but not programmers. I intend to cover the basics (variables, arrays, funct...
Possible Duplicate: Is there a canonical book for learning Java as an experienced developer? I've been coding for close to 25 years now in basic, (C64 & Amiga), (Object) pascal, C, LPC and for the last few years, Python. Python is definitely my favourite (and strongest) language. However, lately I've been forced to ...
C99 has been with us for a while now. It introduces a lot of features that are not in K&Rs The C Programming Language. None of them are particularly radical. However, even small features like being able to intermingle declarations and code change how one organizes code. While I still consider the K&R book an invaluable...
If somebody has to start learning to program, where should he/she start? Should he start to write procedure-oriented programs or jump to OOP?
A recurring theme that I came across in my career is being the new developer to arrive in a team, and quickly having an inherent distrust of the existing unit and integration test suites. During the interview you are told by the management that they "strongly support unit testing" and that they openly encourage it. The...
I have a web app that needs to be able to display a PDF. It needs to allow the user to page through the PDF, and my application needs to be able to know which page is currently being viewed, because other aspects of the web app will change based on the current page. Ideally it would not be dependent on the client hav...
I'm currently in the process of updating a design document so that it is correct and up-to-date for future developers. Currently, the document focuses on only the facts, presenting how the design is. There is no rationale for any decisions presented. I believe that it's important to capture rationale so that developers...
I'm creating a pretty simple database driven application. Whenever I create a db app, I create classes that mimic the data in the db. Is this good practice? Am I better off making one big call to the database and populating my objects and working with these objects, or should I retrieve data from the db only when neede...
I am looking to buy an Android phone to test my first Android app on. What things should I pay attention to to make sure I pick the most suitable device?
Recently my university updated their password storage procedure, and they have several criteria such as that the password must contain a number, symbol, and uppercase character, and has a length requirement. Realistically, when a brute force / dictionary attack is being performed, doesn't this just make it easier for t...
It seems to me that you cannot possibly write a software specification in English that is completely free of ambiguities, simply due to the informal nature of natural language - and therefore that a truly unambiguous specification must include code written in a formally specified language. Is this a known result or am ...
What is the difference between templates and design patterns in JavaScript? I read about the template method design pattern and now I wonder how it relates to JavaScript templates (if at all).
..by this I mean a logic handler for a chess game. Basically validating a move and checking if somebody has won. Now ignore the complexity of the game(if you can..) I'd like some sort of psuedo code on how it would look using callbacks in javascript. For arguments sake imagine once a move is completed in the browser it...
I have a domain expert to work with, but he would throws a lot of details to me verbally. The business logics are complex, business rules change often, the business process is long and multi-ending / intermediate wait-state. There are a lot of cases to deal with (because there are many states for the account, product...
I just started using git, and because I tend to live in emacs, I want to use one of the emacs integration packages. Looking at this list, I see that there are a lot of packages available, but the blurbs for each of them don't explain very much about their capabilities, especially since I don't know git very well. Whic...
Five methods within my API call the same third-party method. In trying to abide by DRY, does it make sense to wrap this call in a private method?
I am a junior in high school and I've developed an optimization system for functional languages that could be very powerful. My computer science professors at Boise State University believe I should write a paper and take my idea as far as I can. I've formalized my method, but I haven't had an expert look at it rigoro...
What is the difference between idiom and design-pattern? It seems that these terminologies overlap somewhere; where exactly, I don't know. Are they interchangeable? When should I use what? Here is a list of C++ Idioms. Can I call them design patterns? Wikipedia defines, Programming Idiom as a low-level Design Pattern...
I'm a beginning programmer, trying to get a grasp on everything, so pardon the probably mundane theoretical question: I see in a C++ tutorial that prototyping is needed to let the compiler know that a function(?) is coming up and not to throw up any errors. Why does it not search throughout a document to find the func...
In applications that I write at work, I often need to have an external properties/settings file so that certain parameters can be configurable after the application is deployed with the end-user. The file will usually be text or XML and I will usually be implementing in C++ or Java. In the past, I have created Singleto...
Most of the logic for my webservice involves talking to our supplier's webservices (checking availability, ordering etc.) They don't have a test environment and the majority of calls can't be run arbitrarily (for example a cease would be run once and would actually stop a service). Is it feasible to run unit tests in t...
A few years ago I immigrated to another country and early last year I managed to get my master's degree. Back then I was desperately looking for a job and I was fortunate to get offered a job in a small software development company. For the record, back in my home company, I was a well-known developer with a very good ...
I need to take backup of calendar on my phone. We have requirement that we need to take backup of entire calendar data. Now, phone always supports recurring events. So, event may exist from 01-01-1601 to 31-12-3000. Logically, there is no point of taking backup from 01-01-1601 to 31-12-3000. I just want to know your vi...
Possible Duplicate: When do you not give help to less experienced programmers? Currently, I am finding a lot of my day is taken up by people asking domain knowledge/system questions. This impacts personal productivity. Should developers learn to say "no" more to ensure they get asked less questions and be more pr...
Ok, as a software engineer, I feel that my skills are valuable in other contexts, for instance, a friend came to me and asked me to setup a website for her research and I did it for free. At first I thought it would put my name out there and give me something to work with and hone my skills in my spare time... But I co...
In the more traditional projects that I've worked on, the project manager (and, on larger projects, there might be associate/deputy/assistant project managers should one person be unavailable) is the person responsible for communicating with the customer, receiving project health and status updates, determining schedul...
I intend on hiring 2-3 junior programmers right out of college. Aside from cash, what is the most important perk for a young programmer? Is it games at work? I want to be creative... I want some good ideas
the term "client" used here is not referring to client's browser, but client server Before cache workflow 1. client make a HTTP request --> 2. server process --> 3. store parsed results into memcache for next use (cache indefinitely) --> 4. return results to client --> 5. client get the result, store into client's loca...
I've noticed that Node.js has become very popular, and I've seen several instances of people doing small-scale projects in it. I've also looked at pros and cons lists to get an idea of what Node.js can do, but I'm still not clear on how it differs from other, more mature server-side tech like PHP, Perl, or Ruby on Rail...
I've just finished the first rails tutorial and now want to learn something about how other developers use it. So is it possible to "read" rails web applications to learn about its architecture and design?
I have a xmpp server design problem, I have been thinking and searching about this for a while, but cannot reach a decision, I hope experts here can give me a hint, really appreciate. <Requirement>    Build a mobile chatting server, this server should allow: 1. Register new user 2. upload user photos 3. edit their pers...
Sandboxie is a program that will let you read from the hard drive, but when you try to write back it will redirect the file to a separate container. I would like to learn how to do something similar. I do not know what terms or libraries to look for. Is there a file redirection API in windows? Is there a open source li...
I would like to know how people approach with developing their websites that are in production. For example:- How do you manage versions, etc. Also, do you create a subdirectory within the production server and work there or do you use any other environment and roll the updates there Do you have any special management...
I'm new to scrum and using it on a project. We do 3 week iterations, estimate at the beginning and then collect the points at the end. We have a product back log (probably not complete). If you do estimates of the entire back log at the beginning aren't those estimate just 'wild ass guesses' So when do you estimate ...
Roles: Development Manager Program Manager Project Manager I have read a bit and independently I understand them well enough. However when you combine them, it seems to me that some responsibilities overlap and it becomes uncertain who is responsible for what. Does anyone have a clear way of defining how each role di...
When I first started programming, I relied heavily on flowcharts (and printer spacing charts). While I was in COBOL class, I couldn't start writing any code until my flowchart was signed off by the instructor. Back then, I had to make flowchart for everything. Today, twenty-five years later, I find myself only flowchar...
I am a programmer, but since I've barely been in the professional market my portfolio is rather bare right now. Still, I started to try and get my website up and running to help a little bit, but what I really need right now is to be able to expand my portfolio. I have a guy who wants me to do a lot of work for him, an...
I have a project to develop an inventory system for a medical shop. Till date, I confronted simple requirements which were fulfilled with XML as the backend db. My interaction knowledge with XML is pretty-good and I can make almost anything with XML using LINQ-TO-XML. Since, this is an inventory system, I am bit confus...
I know that Emacs is a very powerful editor out there. I try to use it occasionally and want to learn it better. But to learn it better i have to use it more frequently than I am using now. But one big obstacle is that I could not find the basic properties like a project auto completion. Maybe I am lazy but I dont wan...
I'm a beginner programmer I have been learning PHP for a while, though not consistently. But for the past few months (say 3 months) I have been a bit consistent in my learning, largely because of a project a friend ask me to do for him since he knew I was into web design. Though I struggled to complete the tiny project...
I have been programming for many years, but one task that still takes me inordinately long is to specify a grammar for a parser, and even after this excessive effort, I'm never sure that the grammar I've come up with is good (by any reasonable measure of "good"). I don't expect that there is an algorithm for automating...
I have a web site and I want to offer a few levels of service - one free, one for a one-off payment, and one for a subscription. My first inclination is to use Paypal for the payment options. I understand that I can make some login page on my site where you create an account or login to an existing account, and then ...
I have created an iPhone application and I have submitted it to Apple and it is currently waiting for review and I have been debating with myself for the past half an hour if I should release a lite version of an app. I was wondering when one should release a lite version of an app once the full app is in the App Store...
A common argument against operator overloading is that it can be and is abused, e.g. A+B doing something completely different to addition. Examples are often quoted in C++ snippets, where the functions overloading the operators don't name the operators (e.g. operator+()). Compare this to Python, where the operators are...
Today, I started reading the book CSS Mastery 2nd edition. It is really a good book for anyone who is interested in learning some techniques. On page 151, I discovered the box-reflect property from CSS3. I tried to find out more information about which browser suports it and the syntax of the property, but I only found...
Could spending time (and actively participating) on Programmers.SE and Stack Overflow help me improve my programming skills any close to what spending time on reading a book like Code Complete 2 (which would otherwise be next in my reading list) will help. Ok, may be the answer to this question for someone who is begin...
Are there any resources for paying more attention to detail as a software developer? (Especially edge cases, or small mistakes in code, details in the problem description, ramifications for certain changes to a large system) Some thoughts so far: - Books of some sort? - Exercise of some sort (e.g. just solving math pr...
We read on Wikipedia > Iterative deepening depth-first search that The space complexity of IDDFS is O(bd), where b is the branching factor and d is the depth of shallowest goal. Wikipedia also gives some decent pseudocode for IDDFS; I pythonified it: def IDDFS(root, goal): depth = 0 solution = None while not so...
Up until now, I've been a great fan of the MVC pattern for developing web applications. For the web, I've developed mostly in PHP (with the Kohana and CodeIgniter frameworks) and Ruby (RoR). As my applications become heavier on the Ajax side (single-page apps etc) I noticed that I can't help but betray the very basic c...
A lot of answers on here suggest linking to your Stack Overflow account on your CV. I only have 300 some points over on Stack Overflow, so I don't think I'll be mentioning it just yet. Still, I'm curious to know how much reputation I should get before "boasting" about it on my CV.
I ran across this question on SO: https://stackoverflow.com/questions/7373066/webpage-source-code-incomplete-hidden-code Without trying to infer too much or start a side-discussion of the sort that SO discourages, I think it's fair to conclude that the OP is someone who is familiar with HTML, Javascript, CSS and the b...
Most projects I am involved with use several open-source components. As a general principle, is it a good idea always to avoid binding all components of the code to the third-party libraries and instead go via an encapsulating wrapper to avoid the pain of change? As an example, most of our PHP projects directly use log...
I'm working on a BlackBerry app, however I'm loading data from various 3rd party websites around the web. (E.g, posts from stackoverflow or currency rates off Yahoo.com) I'd like to know if this could cause any trouble, would it be allowed? Thank you!
Suppose I have a class (forgive the contrived example and the bad design of it): class MyProfit { public decimal GetNewYorkRevenue(); public decimal GetNewYorkExpenses(); public decimal GetNewYorkProfit(); public decimal GetMiamiRevenue(); public decimal GetMiamiExpenses(); public decimal GetMiamiProfit();...
IronScheme is mentioned on Wikipedia as a successor to a failed project called IronLisp, bringing Lisp to CLR and .NET, the way Clojure does for the JVM. Does anyone have experience with this language? It looks fairly complete (99%) but I'm not sure how to judge whether it's worth my time to fiddle with getting it set ...
I have been reading about different software methodologies. Every method has a design phase to some extent, more or less. I am not clear on what we mean by designing. Does this mean writing your thought process on how you will code the feature? Or it is a way of saying what you have coded or will code. The point where ...
I write utility programs (converters, compression tools, etc.) with simple UI’s, which I put for sale of for free download on the Mac App Store. I write these programs in English, and usually add a French localization (which I do myself). By comparing the distribution of sales per country between a localized app and no...
I am building a photography website and I want to allow the user to put tags on their photos for easy searching. But I'm not sure if I want the tags to be an nvarchar field in each picture and then search for that tag in each record or if I want to pull them out and create a separate table of tags and tagIds and then h...
I want to develop an app for a website (let's say stackoverflow.com in this case). Will I violate the Blackberry terms of service if I list an (paid) app for a website which I do not own? What about the website I'm going to use?
Newer systems such as OpenCL are being made so that we can run more and more code on our graphics processors, which makes sense, because we should be able to utilise as much of the power in our systems as possible. However, with all of these new systems, it seems as if GPUs are better than CPUs in every way. Because G...
Well, I basically understand how to use pointers, but not how best to use them in order to do better programming. What are good projects or problems to resolve involving the use of pointers so I can understand them better?
There are lots of academic papers on the merits of functional programming floating around. There's also a lot of debate that I see (on the internet) going on about the relative merits of imperative vs. functional programming. I'm interested to know if that debate extends in academia with actual published papers (the mo...
In an OO language (e.g. but not limited to Java) how do you fix duplicate code depending on the scope of it's occurrence? I would start with (for example) in the same class (scope) perform the Extract Method refactoring (fix) in classes of the same hierarchy (scope) perform Extract Method and Pull Up (fix) ...
I'm starting a new project in PHP, a plugin for a website that grabs additional data from it through cURL, getContents etc and re-tabulates it in excel. It's a local project, basic script like with a very limited UI. Iv'e been using Codeigniter and it's a great framework for websites, and even the Twitter application I...
I'm currently building a fun script, that basically matches given phrases and gives a predefined response based on the match-points. You can ask it to retrieve some information based on live feeds, run tasks, tell anecdotes or just chat with her. I already have built-in detection for badwords, caps lock or both. The pr...
I've been tasked with a solo project to investigate & resolve memory leaks in 8000 lines of Javascript code. I anticipate the project to take up to a month. Please recommend a development methodology I can use to structure my efforts. Prefer something light & easy to pickup and run with. Thanks
as a project manager or CTO how would I calculate the "time" it takes to develop a software system? For Example I would be responsible for developing a large web application in Java, MySQL, HTML, JSF. How do I correctly calculate how much time this takes? Prerequisites: I do not know the team that will do this job (so...
In my scenario, we have a team of experienced developers with 3+ years and they are not co-located. We are in a learning phase in terms of the domain and technology. I want some recommendations in regards to what software methodology we should adapt. I have thought of implementing waterfall, since we have to design up...
At a web startup, is it more common to have an engineer working the front-end AND back-end of the feature (basically in charge of the whole feature)? Or have engineers separated between the back-end and front-end? Which ones are more beneficial and for what situations? The downside, I've noticed, regarding having one e...
I will be mentoring a team of high school students for the FIRST Robotics Competition, most teams here develop[ their robot software using C++. For many of the students on the team this will be their first introduction to programming. I wouldn't have chosen C++ for teaching programming to high schoolers (e.g. Python or...
I work for a large government department as part of an IT team that manages and develops websites as well as stand alone web applications. We’re running in to problems somewhere in the SDLC that don’t rear their ugly head until time and budget are starting to run out. We try to be “Agile” (software specifications are n...
This is more of a design question and i was hoping to get pros and opinions on what makes sense. BACKGROUND Imagine something that holds one or more event listeners. Every now and then the thing fires events to its listeners. PROBLEM The problem is of course that listeners that follow after a listener that throws never...
I've made a 4-line bug fix to a minor issue in a library on github. The project is actively maintained with changes every few days. What is the ideal way to submit a fix that small? Is it to fork, fix and submit a pull request; file an issue and a pull request; or just file the issue with my fix copy-pasted? (Or somet...