instruction stringlengths 34 19.9k |
|---|
I'm learning javascript.
I see that with an object, I can use .prototype, is it fair to say that, in a class/tree hierarchy I am effectively using the 'parent' (or 'ancestor' perhaps) by doing that? Can a class only have 1 prototype at a time as in Ruby?
Call it Personal Homework that I set myself.
|
The recent explosion of phone platforms has depressed me (slightly), and made me wonder if we will ever reach any kind of standard for presentation?
I don't mean language or IDE. Different languages have different strengths and I can see that there may always be a need for disparity, although I do note that languages... |
I'm currently working on a set of reports that have many different sections (all requiring different formatting), and I'm trying to figure out the best way to structure my code. Similar reports we've done in the past end up having very large (200+ line) functions that do all of the data manipulation and formatting for ... |
We have a number of clients, whose systems share some functionality, but also have quite a degree of diversity. The number of clients is growing - always a healthy thing! - and the diversity between their businesses is also increasing.
At present there is a single ASP.Net (Web Forms) Web Site (as opposed to web project... |
I'm looking to build a website (it's actually going to be a commercial startup) I saw this question and it really shed some light on a few things that I was hoping to understand (kudos to the op). After seeing that, it would make sense that, unless the website were required to actually have millions of hits per day, it... |
A common definition of lock-free is that at least one process makes progress. 1
If I have a simple data structure such as a queue, protected by a lock, then one process can always make progress, as one process can acquire the lock, do what it wants, and release it.
So does it meet the definition of lock-free?
1 See eg... |
Possible Duplicate:
Is there a canonical book on Ruby on Rails?
I'm looking to learn Ruby on Rails. I already have a small background in Ruby and don't really need a book that covers both, as I ordered the Pickaxe Book a couple days ago. I recently read some of Beginning Ruby on Rails-Steven Holzner, but abandoned t... |
For long student life I was always wondering why there are so many of them yet there seems to be lack of usage at all in many of them. The opinion didn't really change when I got a job.
We have brilliant books on what they are and their complexities, but I never encounter resources which would actually give a good hint... |
I am a self-taught, novice programmer. The language I chose was Objective-C, so that I can write Apple applications and software. I have learned the hard way that Objective-C has a steep learning curve, but I have forced myself to look at it over and over until I get it right.
I feel I am completing one major step, and... |
Our business analyst has left the team. We are now expected to do the work which was previously done by the business analyst, and the management thinks that a task which is done in three months by a business analyst can be done in one month by a developer.
My experience is in programming only, and I'm not familiar to t... |
Discounting subtly different semantics due to ADL, how should I generally use using, and why? Is it situation-dependent (e.g. header which will be #included vs. source file which won't)?
Also, should I prefer ::std:: or std::?
Namespace-level using namespace:
using namespace std;
pair<string::const_iterator, string::... |
Can anyone provide a rough outline of their git workflow that complies with continuous integration. E.g. How do you branch? Do you fast forward commits to the master branch?
I am primarily working with Rails as well as client and server side Javascript. If anyone can recommend a solid CI technology that's compatible wi... |
I code a lot in both C and C++, but did not expect C to be the second most popular language, slightly behind Java.
TIOBE Programming Community Index
I'm curious as to why, in this age of OOP, C is still so popular? Note that 4 out of the top 5 popular programming languages are "modern", object-oriented capable language... |
I have a MySQL database and an automation script which modifies the data inside once a day. And these columns may have changed by an user manually. What is the best approach to make the system only update the automated data, not the manually edited ones? I mean yes, flagging the cell which is manually edited is one way... |
I'm trying to make some positive changes in my company and one of the changes is implementing continuous integration. We do mobile development (iOS/Android) so I need a CI that supports both types of projects. As you can tell I don't know a lot about CI but I've googled a little bit and I think that Jenkins and Hudson ... |
Hope you can help me with this, I've searched a lot and I got really confused of what to do here.
I'm building a program in C and I need to run it multiple time as I need.
So it's going to be like below,
process 1 handle all rows on DB table test where process_flag=1
process 2 handle all rows on DB table test where pr... |
Looking at so many programming languages we have today, each one being unique in it's own way, I've tried to figure out what the first programming language written for computers is.
Looking at the release date for the popular ones I got somewhat close but I didn't look at less obvious ones, programming languages which ... |
I'm researching ways to build a web service to periodically traverse a predetermined list of web pages (of another external website) to detect if a page's content has changed from
editing of the page, and
deletion of the page.
The end goal is to have this web service post push-notification events to mobile devices.
F... |
This is a question about modern web apps, where a single page is loaded, and all subsequent navigation is done by XHR calls and modifying the DOM.
We can use libraries that manipulate the hash string, which let us navigate by URL and support the back/forward buttons.
But to use those libraries, we need to be able to mo... |
So, a RESTful service has a fixed set of verbs in its vocabulary. A RESTful web service takes these from the HTTP methods. There are some supposed advantages to defining a fixed vocabulary, but I don't really grasp the point. Maybe someone can explain it.
Why is a fixed vocabulary as outlined by REST better than dynami... |
I have been involved in a number of MVC.NET and c# desktop projects in our company over the last year or so while also managing to kept my nose poked into other projects (in a read-only learning capacity of course).
From this I've noticed that across the various projects and teams there is a-lot of functionality that... |
In C++, the integer variable bar evaluates to 1 in this code
int foo = 0;
int bar = ++foo;
and 0 in this code
int foo = 0;
int bar = foo++;
Is this behavior prevalent in most popular languages?
|
How do current web browsers (or mobile mail clients and any software in general) save user passwords? All answers about storing passwords say we should store only hashes, not the password themselves. But I'm having a hard time searching the web trying to find the best techniques to store passwords when we know we will ... |
I have a website in which the code scrapes other websites for getting the accurate data. While the code works good but there a decent lag in performance because the code firsts downloads the html stream from various sites(some times 9 websites), extracts the relative part and then renders the html page.
What should I d... |
I am planning to build a RESTfull API but there are some architectural questions that are creating some problems in my head. Adding backend business logic to clients is an option that I would like to avoid since updating multiple client platforms is hard to maintain in real time when business logic can rapidly change.
... |
I don't understand the difference between "normal" software and enterprise software. Even after reading these...
"Enterprise Software" on Wikipedia
"Enterprise Software Is Sexy Again" on Techcrunch
"The Great Enterprise Software Swindle" on Coding Horror
I can't really wrap my head around the real differences. Is t... |
What's a better word for an optional requirement in software engineering? The phrase is contradictory. I've used "Non-Core Requirements" in previous projects.
|
I am about to graduate, and I am already working as a web developer in our library IT department.
When I look at job postings I am absolutely overwhelmed by the sheer variety of technologies out there.
Some companies care about math + algorithms + data structures. Some care about experiences in technology stack XYZ. ... |
I want to make a delicate application of mine (an antivirus actually) open source but I want to have a control on who really obtains the source or not. Preferably they should apply and I or administrators approve their applications. Is there any online platform for this?
The main reason for the control/security is to p... |
I am working on a refactoring of some services and would appreciate some critique on my general approach. I am working with three back-end data systems and need to expose an authenticated front-end API over http binding, JSON, and REST for internal apps as well as 3rd party integration. I've got a rough idea below that... |
I have gotten very familiar with the core functionality of Javascript and now I am aiming at learning DOM manipulation. I have already thought of learning jQeury for this but I don't know if it is good idea to learning it before first getting familiar with the core functionality of the DOM.
Should I first learn the cor... |
Imagine you give someone a card with the code "5SBDO0" on it.
In some fonts, the letter "S" is difficult to visually distinguish from the number five, (as with number zero and letter "O").
Reading the code out loud, it might be difficult to distinguish "B" from "D", necessitating saying "B as in boy," "D as in dog," ... |
Using URL rewriting for session management for plain HTTP communication is a recipe for disaster, however, does some of that risk go away if you're using SSL (https)?
|
I've built a multi threaded messaging application in C and I'm currently using a MySQL Memory table to save the session ID, but I'm not sure whether this was a good decision or not.
It works like this, the application sends a message and saves the source session ID in the MySQL table. When the application gets the succ... |
I am a bit of a vocal proponent of the Behaviour Driven Development methodology (aka BDD). I've been applying BDD for a couple of years now, and have adopted StoryQ as my framework of choice when developing DotNet applications. Even though I have been unit testing for many years, and had previously shifted to a test-f... |
I'm trying to convert a set of "blocks" in to a grid-like layout. The blocks have a width of either 25%, 33%, 50%, 66%, or 75% of their container and each row of the grid should try to fit as many blocks as possible, up to a total width of 100%.
I've discovered that trying to do this while leaving no remaining blocks i... |
I'm pretty new to the web development scene, and I just want to be absolutely clear on this because I've read a few conflicting statements.
I was under the impression that "html5" is a particular way of constructing xml to represent data for a webpage and "javascript" is a programming language that runs as client-side ... |
I just wanted to know what the difference is between static code analysis and code review. How are each of these two done? More specifically, what are the tools available today for code review/static analysis of PHP? I would also like to know about good tools for code review for any language.
|
Why are some frameworks (e.g. Flask for Python, Sinatra for Ruby) called microframeworks?
What differentiates them from full-fledged frameworks, like Django or Rails?
|
About your own project, in which way does it give you more improvement?
Read high quality code in the same domain, implement your own.
Write one project from scratch with your imagination.
My point is that it is not practical to write something like networking lib or graphic engine without knowing what other people d... |
Sorry about the many abbreviations in the title... My observation is that applications built with an object-relational mapping like Hibernate tend to follow a service-oriented architecture instead of an object-oriented one.
Some people (e.g. here) say the Single Responsibility Principle suggests that dealing with readi... |
I'm trying to create a kind of turn-by-turn satellite navigation system using the iOS SDK. I get the directions from the server and draw them on the map, then I keep getting location updates from the iPhone's GPS chip. Currently I start by finding the nearest turning point then, each time the user comes within a certai... |
As a Java programmer I need to learn algorithms (for programming Challenges). I read some Head First Series (JAVA owned by me) and they are pretty brain friendly. So I was wondering is there any algorithm book that will be simple to understand and also goes to the crux of each algo.
|
I don't know whether this question fits better on this site or on Stack Overflow, but because my question is connected rather to practices, that some specified problem.
So, consider an object that does something. And this something can (but should not!) can go wrong. So, this situation can be resolved in two ways:
firs... |
I'm working full time 5 days a week, mostly between 10 and 14 hours a day.
In the end of the day I'm very tired and just wanna take a shower, hang out and go to sleep.
I have a lot of ideas that I want to implement and someday sell maybe through an online software business.
I have my weekends free. However, when I get ... |
I want to implement functionality which let user share posts by other users similar to what Facebook and Google+ share button and twitter retweet.
There are 2 choices:
1) I create duplicate copy of the post and have a column which keeps track of the original post id and makes clear this is a shared post.
2) I have a se... |
From Clean Code, about Cross-Cutting Concerns:
Note that concerns like persistence tend to cut across the natural object boundaries of a domain. You want to persist all your objects using generally the same strategy, for example, using a particular DBMS...
Is Active Record an example of aspect-oriented programming?
... |
At the moment every javasrcipt file in our project includes closure wrapper. Before deploying all files are concatenated and minimized.
And i'm asking myself, do we really need all that closures OR one closure added after concatenation will do the job.
I can see only one reason not to do that - the variable we are shar... |
I've been taking a look at Ruby Shoes for GUI development with Ruby. So far, it's been a pretty good experience for making simple apps. However, I am quite worried about being able to write large scale applications with it. For example, how would I go about using MVP pattern with this framework?
For now, I have not bee... |
I'm building a web app and I need a JS framework like Backbone.js to work with my backend provided by Rails that mostly return JSON objects after DB queries.
Searching on the web I've discovered Backbone which seems to be complete, quite popular and actively used in development but I've noticed that a lot of things don... |
I've been looking around for a way to give back to the community, but I haven't found my right fit yet, so an idea came to mind: A non-profit technology "company" that targets non-profits.
Do these exist? I've been doing some google searches and can only find software that is targeted for non-profits that is created b... |
Possible Duplicate:
How could the first C++ compiler be written in C++?
I know my question goes to the underground galaxy cave where languages are born and involves some lambda math and light-years of google-studying. But what kind of knowledge is necessary to create a language?
|
Current configuration file is as follows:
mainwindow.title = 'test'
mainwindow.position.x = 100
mainwindow.position.y = 200
mainwindow.button.label = 'apply'
mainwindow.button.size.x = 100
mainwindow.button.size.y = 30
logger.datarate = 100
logger.enable = True
logger.filename = './test.log'
This is read with python... |
A friend of mine told me that, the best practice is class containing main method should be named Main and only contains main method. Also main method should only parse inputs, create other objects and call other methods. The Main class and main method shouldn't do anything else. Basically what he is saying that class c... |
http://www.itjobswatch.co.uk/jobs/uk/cics.do
http://www.itjobswatch.co.uk/jobs/uk/tuxedo.do
Look at the demand for programmers (% of job ads that the keyword appears), first graph under the table. It seems like demand for CICS, Tuxedo has fallen from 2.5%/1% respectively to almost zero.
To me, it seems bizarre: now we ... |
Background
During the course of developing our site (ASP.NET), we discovered that our existing source control (SourceGear Vault) wasn't working for us. So, we decided to migrate to Git. The translation has been less than smooth though.
Our site is broken up into three environments DEV, QA, and PROD. For tho most part, ... |
some background:
work with multiple team mates
each work on our own MBP
I'm setting a build machine that we can git push to in order to generate a build (aim to allow anyone to push to the build machine and then generate an archive, upload to testflight and send on its way)
problem:
getting my apple developer certi... |
First of all I want to point out my concern with some pseudocode (I think you'll understand better)
Assume you have a global debug flag, or class variable named "debug",
class a :
var debug = FALSE
and you use it to enable debug methods. There are two types of usage it as I know:
first in a method :
method a :
... |
Is there a practical solution to organizing the initial tasks for a new project?
To elaborate, imagine the features/stories/goals are laid out for a project. How might one go about organizing those into sane tasks for the first few versions?
The scenario I typically have in mind has the features listed as a high-level ... |
I'm working on a project (for college) in C++.
The goal is to write a program that can more or less simulate a beam
of particles flying trough the LHC synchrotron.
Not wanting to rush into things, me and my team are thinking about how to implement this and I was wondering if there are general design patterns that are ... |
Question
Should the functional requirements in a requirements doc use wording based on verbs?
Context
School assignment, working in a team, working through the SDLC. The requirements doc has been done and we are now into design.
Problem
The requirements doc has an enumerated list of what I'd call features of the app - ... |
I'm trying to understand the following cross-browser layout: http://matthewjamestaylor.com/blog/perfect-2-column-left-menu.htm but I'm having some confusion with some of its parts and there isn't enough information on the page or in the css comments to help me.
What is the purpose of the .colleft div? Why can't the 2... |
While I'm certainly under no illusions that building software without an IDE is possible, I don't actually know much about doing it well. I've been using graphical tools like Visual Studio or Code::Blocks so long that I'm pretty well lost without them.
And that really stinks when I want to change environments or lan... |
I work in a small startup with two front end developers and one designer. Currently the process starts with the designer sending a png file with the whole page design and assets if needed. My task as front end developer is to convert it to a HTML/CSS page. My work flow currently looks like this:
Lay out the distinct p... |
I've searched all around for some good sources, but either have been searching for the wrong keywords, or I'm just missing something. I'm looking to redevelop a web app I've been using for some time now. Many parts are out of date, and we're constantly throwing in little hacks to attempt to give it new life.
So what I'... |
I started following an MS in computer sciences after about two years of work for a software company. I worked primarily in data warehousing and business intelligence related software development during my previous occupation.
There is a high chance for me to select a research in knowledge representations, ontologies an... |
I need a programming language for text editing and processing (replace, formatting, regular expressions, string comparison, word processing, text analysis, etc.). Which programming language is more powerful and has more functions for this purpose?
Since I work PHP for my web projects, I currently use PHP, but the fact... |
I'm trying to decide whether moving to VCS is sensible for me. I am a single web developer in a small organisation (5 people). I'm thinking of VCS (Git) for these reasons: version control, offsite backup, centralised code repository (can access from home).
At the moment I work on a live server generally. I FTP in, make... |
Our project uses a user-specific configuration file. This file is currently not in version control, since it is different for each user. The problem is, whenever a developer adds a new module that requires configuration, or changes the name of an existing modules, the other developers get errors because their private c... |
I have a social network server with a MySql DB. I want to show the users feeds like done in Facebook. Example - UserX now Friend with userY, userX did like on postX etc.
Currently I have table: C1 : UserId C2 : LogType (now friend, did like etc) C3 : ObjectId (Can be userId or postId) - set depending on the LogType.
Cu... |
What is the optimal way to update the subscriber's local model on changes C on a central model M? ( M + C -> M_c)
The update can be done by the following methods:
Publish the updated model M_c to all subscribers. Drawback: if the model is big in contrast to the change it results in much more data to be communicated.
... |
In a debate regarding return variables, some members of the team prefer a method to return the result directly to the caller, whereas others prefer to declare a return variable that is then returned to the caller (see code examples below)
The argument for the latter is that it allows a developer that is debugging the c... |
I am learning DBMS in my college. Recently I was given an assignment to draw a E-R Model of a Bus Reservation system which handles Reservations, Ticketing and cancellations.
I understand the theory about E-R model when I study from a book, but it gets confusing when I try to draw one from scratch.
How should one procee... |
C# and Java has code attribute and code annotation. I don't know about other languages, but I know the code annotation feature is used to expand language itself.
I knew what it is, but I want to know how it developed over time. I want to know its history. How it demanded and how it implemented. Is this possible to impl... |
My company has recently began using Apache Solr to search its data. As we learn how to use it we have gone down the path of indexing multiple fields to get the results we need. Most of these are either N-Grammed or Edge-N-Grammed (N-grammed, but only from the edge; for starts-with searching).
Gramming by nature takes u... |
I've got an assessment to give to my students.
It's about C++ and function pointers.
Their skill is middle: it the first year of a programming school after bachelor.
To give you something precise, here's a sample of a solution of one of 3 exercices they had to do in 30 minutes (the question was: "here's a version of a ... |
I run a site which has a couple of million photos and gets over 1000 photos uploaded each day. Up to now, we haven't kept the original file that was uploaded to conserve on space. However, we are getting to a point that we are starting to see a need to have high-res original versions. I was wondering if its better to s... |
I'm reading about actor based concurrency and I appreciate the simplicity of actors sequentially processing messages on a single thread. However there is one scenario that doesn't seen possible.
Suppose that actor A sends a message to actor B, who then performs some long running task and returns a completion message to... |
I am writing unit tests for a fairly simple function that depends on a fairly complicated set of data. Essentially, the object I am manipulating represents a graph and this function determines whether to chart a line, bar, or pie chart based on the data that came back from the server.
This is a simplified version, usin... |
While maintaining the sites our development team has created, we have come across include files and plugins that have proven to be very useful to more then one part of our applications. Most of these modules have come with two different files, a normal source file and a min file. Seeing that the performance and speed... |
I maintain a software, a small PHP library, that is released under the LGPL version 3 license (LGPLv3). Someone wants to use the library in their software which has the GPL version 2 license. This license compatibility matrix suggests this is not possible without changing the licensing terms of one of the software. I h... |
I've seen multiple posts about rewrites of applications being bad, people's experiences about it here on Programmers, and an article I've ready by Joel Spolsky on the subject, but no hard evidence or case studies. Other than the two examples Joel gave and some other posts here, what do you do with a bad codebase and h... |
Currently in a debate at work and I cannot fathom why someone would intentionally avoid Inheritance with Master Pages.
For reference here is the project setup:
BaseProject
MainMasterPage
SomeEvent
SiteProject
SiteMasterPage
nested MainMasterPage
OtherSiteProject
MainMasterPage (from BaseProject)
T... |
The title says it all: Are halting and terminating synonyms in the context of computability theory?
|
I'm on a project team of 4 devs, myself included. We've been having a long discussion on how to handle extra work that comes up in the course of a single work item.
This extra work is usually things that are slightly related to the task, but not always necessary to accomplish the goal of the item (that may be an opinio... |
First of all please be aware this post contains some abusive language but I hope it will not bother anyone. I apologize for the bad language but that's what the name is.
As I've been doing documentation on existing programming languages attempting to make a complete list of them I stumbled across terrible programming l... |
Working with libraries like Seam, Guice and Spring I have become accustomed to dealing with variables within a scope. These libraries give you a handful of scopes and allow you to define your own. This is a very handy pattern for dealing with variable lifecycles and dependency injection.
I have been trying to identif... |
I understand the role of the model and view in the Model-View-Controller pattern, but I have a hard time understanding why a controller is necessary.
Let's assume we're creating a chess program using an MVC approach; the game state should be the model, and the GUI should be the view. What exactly is the controller in t... |
I am a freelancer and work as a single developer. In all cases, I am the person wearing different hats. I am the Scrum Master and I am the only person in the development. What I am not is the Product Owner?
Are there any Agile Methods and free tools that a freelancer can make use of?
|
For educational purposes, I'd like to write an application on a Linux environment that can process keyboard events and draw graphics without huge dependencies like X or SDL. I presume that this must be possible, because X and SDL are just programs themselves, so they must rely on other methods inherent to the environme... |
What are some recommendations for a build tool that would allow me to upload changes to a web server or a repository and minify the js and css automatically, and possibly even run Closure compiler on the JavaScript?
I'm not worried about doing anything with the php code other than update with most recent changes althou... |
C has pointers and Java has what is called references. They have some things in common in the sense that they all point to something. I know that pointers in C store the addresses they point to. Do reference also store the address? How they are different except that pointer is more flexible and error-prone?
|
I have two related questions:
Are there any good books for multithreading in C++, especially now that C++11 contains multithreading in the standard library?
I have the Wrox Programming on Unix book (1000 pages fat red one) and within it, it uses the Unix Thread class.
How does this code relate to boost and the C++1... |
I've seen a lot of stuff that describes how it's done, but not a lot that tells WHY it's done. Is it just a way to keep the code readable, or is there a better reason?
|
I am developing an open source ruby application under the MIT license. I am using this license because I don't want to place any restrictions on the users of the application. Also I can actually read and understand this license.
I recently started using another ruby gem in my project (require "somegem"). This ruby g... |
Being an IT student, I was recently given some overview about design patterns by one of our teachers. I understood what they are for, but some aspects still keep bugging me.
Are they really used by the majority of programmers?
Speaking of experience, I've had some troubles while programming, things I could not solve fo... |
I heard the phrase classic object oriented programming. Is it different from present object oriented programming, like classic ASP and ASP.net?
|
My question may seem silly, but, I've read in many Android books that the better part of Android is Android is open, and iOS is closed.
But, from a programmer viewpoint, who cares about this point? Programmers just care about the platform: is it easy to program in, easy to have help in the network, etc. They don't care... |
Possible Duplicate:
Google is good or bad for programmer?
I'm currently in college to be a software engineer, and one of the main principles taught to us is how to learn for ourselves, and how to search the web when we have a doubt.
This leads to a proactive attitude - when I need something, I go get it.
Recently,... |
To me, the use of the keyword static in C and languages like C# and Java are "false friends" like "to become" in English and "bekommen" in German (= "to get" in English), because they mean different things.
In C static means, that the function or variable is only accessible via functions inside the same source file, co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.