instruction
stringlengths
34
36.1k
We have a small webdesign firm, and count with one designer. We can currently not afford too much expansion in the design area, so that means that the designer creates the main design of a website (which often means: the homepage), and the programmers then work with this to make it into a website. In general, this work...
I'm wondering what are the specific differences in the terminology we use for grouping related parts of code. I've sometimes seen the terms used interchangeably: many OO languages even use the keyword "function" to define a method. (Why?) If you wanted to be precise, what are the specific meanings of each? Or is it jus...
So, I'm a computer science major and I'm also a huge fan of the no-longer-on-TV show, Numb3rs. Now, whenever I talk with my friends they also ask me quite a few questions about programming and computers (and how they work). Now, on Numb3rs, they (Charlie, and occasionally Amita or Larry) often went on short, but well ...
Think JSFiddle. LINQPad is pretty sweet for fast C# with similar options. Is there anything like LINQPad that runs in a browser?
do you know of any algorithms which give an exact solution for the Traveling Purchaser Problem. I can only find heuristic and probabilistic approaches. I do have implemented a genetic algorithm so far, which by its nature does not terminate by itself an does not always yield the optimal result. Thus I'm looking for an ...
Today Javascript application of a relevant size become more and more common, and as the need arises, certain patterns are identified to manage the code complexity. I try to follow good advice, but I have some trouble in organizing the view layer of an application I am writing. While the other layers are nicely decouple...
I had a job process that was executing a lot of IO to read and write temporary files. Now I want to (need to) reduce the quantity of IO executions. So I want to create a sort of circular buffer that is going to be filled up with a data from a text file within first thread. The consumer (reading) thread will fetch d...
It's not uncommon to hear of decoupling the UI from program logic, or database design/access from program logic...or even program logic from itself. However, I've never heard of an approach to generalizing or abstracting away the details of threading tasks to the logic (aside from Tymeac, an Android-specific package). ...
I've been putting time into learning functional programming and I've come to the part where I want to start writing a project instead of just dabbling in tutorials/examples. While doing my research, I've found that Erlang seems to be a pretty powerful when it comes to writing concurrent software (which is my goal), but...
I have a form with several controls on it. Every control has to be declared in the class, formatted in the constructor (-size, location, event subscription etc), and its event-handlers declared, again, in the class. This is getting a bit unorganized, so I was thinking of refactoring this. For every control: Preparing a...
Does anybody have experience with using a bug-tracking / issue-tracking software like bugzilla, mantis or JIRA not only for bugs or tasks, but to initiate and maintain discussions that in the end lead to a decision? For example, a developer thinks that all protected fields should be abolished and changed to private fie...
I am a Java developer and most of my experience is on Java. But sometimes I have face some database related questions in the interviews. Hence I wanted to ask that from the interview point of view, which questions a Software Developer/Sr. Software Developer (non-DBA, non-Database Enigneer) should be able to answer abou...
What should I search/research if I'm looking for how to get started with translating database tables to Java code? For instance, if I have a one-many relationship in the database and I want to translate that to java code...what is that process called? I'm really looking for just plain Java code example and not any too...
Possible Duplicate: Using “Foo” and “Bar” in examples I discovered that in many examples of code i various books/questions/answers/tutorials the word Foo is used to name functions, interfaces, classes, properties, variables etc. It is a special name, or is simple to name something in 3 letters, and why Foo?
When I picture a really well functioning software team in my mind, one of the visions I have is of a developer showing off to a small group of devs some cool, clever UI that they just came up with based on something that they were just playing with. I'm afraid that while we're doing great at being creative writing expr...
I have been given the task of producing a compilation of pros, cons and key points on the issue of mobile native applications versus mobile web applications. It will be input for a discussion on top management level. What are some valid and maybe overlooked topics here?
For someone who doesn't have much real world experience yet, the notion of maintainable code is a bit vague, even though it follows from typical good practice rules. Intuitively I can tell that code can be well written, but not maintainable if for example it hard-wires information that is subject to constant change, bu...
Yes, you can access the mobile web site from a range different mobile devices, but the platform, I suppose, is still the web server and the client browser (the latter ideally being the "same" on any device). When talking mobile and cross platform I am thinking frameworks such as PhoneGap and Appcelerator Titanium, but ...
Regarding source folder hierarchy, there are always some common features, such as the src, doc or test folders, which have rather easy-to-understand contents. However, I realized that big projects have both a lib and vendor folders, while I had always thought they were the same, as their names hint at including “third-...
I am starting a project with following technical environment : .Net 4.0, Entity Framework 4.0, WPF with MVVM Architecture I saw lots of examples on the net, some books with this environment. In some of the examples authors had this Idea : Viemodel will have an instance of Model class (Entity Framework Entity e.g. Pers...
I'm looking for assistance in figuring out the best approach to managing User Acceptance Testing (UAT) and how users raise defects/bugs - I've been in the situation before of having to deal with a free for all in that every small error is raised as a bug which takes valuable time from actual bug fix whilst I sift throu...
I've been doing research on .net implementations with CQRS. Either everything I've seen so far is do-it-yourself, azure-specific, outdated (i think), or not well adopted Problems: Scritchy - is not well adopted NCQRS - appears to be a bit older? it also requires a DIY-ish setup - meaning, you need to create several pr...
Does Entity Framework mean you might never have to use SQL or design database tables again? Is this what "persistence ignorance" means? I am new to EF and ORMs in general, and I would like to understand how much of it is hype and how much is reality.
When should you prefer inheritance patterns over mixins in dynamic languages? By mixins, I mean actual proper mixing in, as in inserting functions and data members into an object in runtime. When would you use, for example, prototypal inheritance instead of mixins? To illustrate more clearly what I mean by mixin, some ...
The following scenario often happens with my team at the office. Let's say we decided to plan our Sprint this way: 50% new features 50% bug fixing (they are high priority AND unestimated as the fixes are easy, the hard and time-consuming bit is the investigation) The Sprint goes well and we finish all the features, s...
When you are being interviewed by potential future employers, it is of course of benefit to both parties to discuss what your previous job entailed (ie, what you have been doing for the last few years). What if the technology (and the ideas behind the technology) that you have been working on is sensitive and confiden...
In Pro C# 2008 it is stated Using constructs such as AppIDs, stubs, proxies, and the COM runtime environment, programmers can avoid the need to work with raw sockets, RPC calls, and other low-level details. It then demonstrates a VB6 call where a COM object is instantiated by passing in the AppId. Then, a method...
I was reading, Facts and Fallacies of Software Engineering, which has a section of maintenance. Since, I'm have been a maintenance developer for years now, I was very interesting facts presented. Here's three. Fact 41: Maintenance typically consumes 40 to 80 percent (average, 60 percent) of software costs. Therefore, ...
There's a quotation by Ralph William Gosper, Jr that says: A data structure is just a stupid programming language. What did he mean by this? Alas, all I can find in Google about it is relentless copy/pastes of the quotation itself, without any context.
I am debating with my colleague on when to perform code review - before or after unit tests. What is the best practice? Some factors we might need to take into account (there may be more): Size of code change - a big change means more changes will result from the code review. If these changes are big than, if UT was...
After a while, we are hiring again, and I'm reviewing tests for programmers; some of them are a bit out of date. What are some of the FizzBuzz-type questions for web developers and SQL? That is, not too trivial, but still solvable in five to ten minutes with pen and paper and without Google? I typically eliminate about...
I would like to make my programs much less of a hassle to extend or create, I am imagining a scenario where the end user has a variety of check box options that affect how the program interacts. Something like in a word processor where you say underline, or bold, or to a game where you say, include this feature exclude...
If I were to build a Twitter or Facebook application using pure client-side technologies like HTML and javascript, how would I mask/hide my API keys? For example, for Twitter I have consumer key and consumer secret. In order for me to call Twitter's API I'll have to pass these keys to authenticate my app. If I am usin...
Google App Engine has been great for trying out ideas and learning stuff, but so far I haven't seen much confidence in the community in using it for production applications. One significant issue that has come up over and over again is that when things go wrong, it's nearly impossible to actually talk to anyone at Goog...
Recently, I was developing a set of coding standards for our company. (We're a new team branching out into a new language for the company.) On my first draft, I set the purpose of our coding standards as improving Readability, Maintainability, Reliability, and Performance. (I ignored writability, portability, cost, c...
While I agree that catching ... without rethrowing is indeed wrong, I however believe that using constructs like this: try { // Stuff } catch (...) { // Some cleanup throw; } Is acceptable in cases where RAII is not applicable. (Please, don't ask... not everybody in my company likes object-oriented programming a...
I have been developing Windows applications in C++ for like 10 years now. And recently I've started digging into some Linux projects, and I can't stand how unproductive I am... I'm a fast learner, and I've been using Linux as a primary platform for some time now. And I do feel very comfortable with shell, OS principles...
Here's a question for me that really makes me wonder every time I start designing and developing a thick-client desktop application. I'm a .NET developer, and with my forms (WinForms mostly, but the platform should be unimportant) I also choose the startup position to be Center. The reason I do this is because I can't...
Say I have class that is partially implemented as a static class and partially implemented as a singleton. Besides "kludge" and "code-smell" (imo this is both) is there a more appropriate term for this type of mixing programming idioms?
I was reading the following article: Great Hackers The following part grabbed my attention: "When you choose a language, you're also choosing a community. The programmers you'll be able to hire to work on a Java project won't be as smart as the ones you could get to work on a project written in Python. And the qualit...
I'm trying to understand the origins of AJAX, and think MSXML and XMLHTTPRequest were the objects that started it all. Which came first, and/or became the defacto way to create dynamic pages?
In order to implement JSR 292, a.k.a. invoke dynamic, something called richochet frames is introduced into the hotspot vm. I'd like to know more about it, such as invoke dynamic itself, how richochet frames implements it, where the name richochet comes from, etc. Google seems to be not very helpful here. Any pointers w...
It would be interesting to hear what is used besides sketches from UX engineers during development of a GUI. Unfortunately our UX team provides just a minimum of requirements for GUI screens. I believe that a better solution would be to use some tables with requirements and state machines or may be just some text desc...
I am web developer and have experience of developing several web applications in PHP. I have an idea of developing a product for myself and decided to use a MVC based framework because I really like the idea of MVC and how one can easily manage and modify the application without any difficulty. I chose Zend Framework a...
Is there any other reason for using session variables besides keeping the values longer than the current request? For instance, is it advisable to use session data when storing information in a file on the file system to prevent one user from writing data to the file of another user? I understand what a session variabl...
I'm in the process of developing a signal management and routing module for an integrated audiovisual system and am designing it with the intent of being as flexible as possible across different signal distribution networks. The intent of the module is to handle routing across a number of stacked matrix switchers1 and ...
I want my app to be able to manipulate images and create watermarks and also needs to run on both windows and mac. Hence I've been investigating QT. Does QT ship with all the libraries I will need to achieve that? or will I have to get other standard C++ libraries? If so is it worth doing the project in QT?
If someone writes code so that an internal variable $_fields is accessible without using getter/setter methods, is there a proper term used to describe that? Something polite enough to use with management :)
I've been thinking about making a generator for managing subscriptions with options for a couple different payment processing services, it is something that I would use. Are there any existing examples of this, or any thoughts on a generator. I thought it might work like the scaffold function, similar to the authentica...
When a login is needed in a system to perfom any action. How do you express that in a Use Case Diagram? I have a system that will allow employees to perform sells. They must be logged in, but once they are, it is not necesary to log again until the session ends (typical login). I do not know how can I express that that...
There are many answers in my previous question about simplicity relating to readability that helped me see my definition and understanding of simplicity in code was, quite possibly, incorrect. How can I define simplicity in code? What software measurements and metrics are available to measure code simplicity?
Is it OK to have a nested class raise an event and for the parent class that subscribes to that event subsequently raise another event, which it's parent class has subscribed to - thus passing the original event up the class hierarchy? It may be easy to explain like this... We have... Class A Class B Class C Operation...
I'm a little bit confused about these two terms "Linq to SQL" and "Entity Framework". I have the general idea that both of them somehow allow you to refer to database tables as .net objects or something of the sort, but please explain to me the difference between these two terms.
I hear/read all the time that it is cleaner to keep your js, html and css separated. Supposedly it makes it more easy to maintain, debug. Supposedly it is more efficient, because it allows caching/minifying css and js files. As far as I am concerned, using web frameworks (Django, Rails, ...), javascript templating libr...
I am a c# developer. I have always been interested in increasing my skills and knowledge and trying to pickup new technology. However now I want to enhance my knowledge in Programming standards and principles. So for example I want to know about how to structure code, refactor code, coding standards and good practices ...
I recently joined a new position as SW developer and during the interview process everyone stressed the importance and the pride of the quality standards of the firm in each and every process they have. (This was one of the aspects that made me decide to accept the offer) When I started inspecting the database I realis...
What are the practical limits for the number of items a C# 4 Dictionary or Hashtable can contain and the total number of bytes these structures can reasonable contain? I'll be working with large numbers of objects and want to know when these structures start to experience issues. For context, I'll be using a 64-bit sys...
I’ve been hearing about the London style vs. Chicago style (sometimes called Detroit style) of Test Driven Development (TDD). Workshop of Utah Extreme Programming User's Group: Interaction-style TDD is also called mockist-style, or London-style after London's Extreme Tuesday club where it became popular. It is usually...
I am writing a routine which has the following form: TRY A IF no success, B IF no success, RETRY A IF no success, throw error It's not trivial to extract either A or B into it's own routine, so what is most simple structure that will allow me to retry A without code duplication? Currently, I have a do..while that allo...
What are some of the software technologies behind "real-time" web apps, like Twitter, Trello, or even Gmail? I know there's a webserver and probably a database on the backend, but what are the software pieces that make for that rich web interaction that I'm seeing more of today?
In my ample (NOT!) spare time, I'm fiddling with Lhogho and wondering how to go about morphing it into a script engine for web browsers, viz <h1>My First Web Page</h1> <script type="text/lhoghoscript"> print [Hello World] </script> </body> </html> Any suggestions where to start? For Windows, I supp...
I'm developing a GUI application, heavily working with graphics - you can think about it as a vector editor, for the sake of the example. It is very tempting to make all data structures immutable - so I could get undo/redo, copy/paste, and many other things almost without effort. Fot the sake of simplicity, I will use ...
Hello I think I have a nice idea to implement for human kind goodness. I call it FixTheUnFixed. The idea goes like this, imagine you are driving or traveling all over the world and when you see some obstacle or damage - broken light, trash covering the street or any other problem you would like the responsible authorit...
I am basically a java programmer who wants to move to .net. I haven't worked in .NET companies so I don't have any idea about the tools they use. In a Java company people use Maven, Hibernate and frameworks such as JSF or Tapestry. My questions are: What are the tools/frameworks that .NET/C# companies use? Do they use...
We are looking at improving the process for handing over tasks from architecture to development. At one end of the scale it there is no architecture guidance you risk getting chaos, with each developer doing things his way. At the other end of the scale where everything is specified, the specification takes longer than...
I am working on a side project at work where I find it beneficial to use some of my code that I have developed personally (outside of work) to speed my development. My side project is developing a C++ GUI application to let our power users run queries (built by me) against databases on several different platforms (DB2,...
My Agile team is following practices of XP like pair programming(J2EE), 45 work hours/week, TDD etc. Do you have any recommendations of open source tools (dev, test & build integration) and templates(user story, burndown charting) etc. for enabling my team to focus on business value delivery. I am the iteration manager...
I'm currently working on a website which is also supposed to be mobile optimized. My client has provided me with a layout of how the mobile version of how the website should look like. Making their design wish come true is no biggie, but making the design fit the screen is my issue. Right now I'm facing some issues r...
Is there an algorithm to search a directed graph (tree) for its neighbors neighbor? My current brute-force solution works as follows: for each node n: for each child c of n for each parent p of c if (p != n) insert edge (p,n) I am dealing with ca. 700.000 nodes each having between 1 to 100...
I appear to have done something wrong here, so let me try to rephrase this more simply so I stop giving the wrong impression. I'm in the planning stages of a project right now, on my own time; I'm currently defining the scope of the project. I can see this application also releasing an Android app; furthermore, I've lo...
I am contemplating a few different techniques for organizing code for a larger web application. For this situation, the server runs some Microsoft solution (probably ASP.NET MVC or OpenRasta) and the client (JavaScript, CSS, etc.) will consume this. Traditionally in an MVC application, the controllers and models along ...
Why standard C++ doesn't respect system (foreign or hardware) exceptions? E.g. when null pointer dereference occurs, stack isn't unwound, destructors aren't called, and RAII doesn't work. The common advice is "to use system API". But on certain systems, specifically Win32, this doesn't work. To enable stack unwinding...
I was wondering whether there were any estimating models for projects which use the results of previous projects. For example, imagine I want to develop an application for a phone based on a web app I completed last month. Say the web app took 1000 hours but that I don't know anything about mobile development. If you w...
HTML 5 applications in the browser really seem to be taking off. I've been using src:kit within Google Chrome for a few weeks and love it. I'm an ASP.Net (C#/MVC 3) developer by trade, and in the past did several pieces of WebForms programming. With Windows 8 app development moving into the trade of local HTML5 apps, ...
What thought process should one follow to convert a sequential algorithm to a parallel one ? Are there any specific code pattern that can be parallelized. Some patterns that I normally use are: Looking for loops that can parallelized. Try to break algo in some form of Map-reduce format. Looking for producer-consumer ...
I'm working on an application, and adding logging, but now I'm stuck. I want to allow (not force!) the user to set the location of the logfile. Basically, my problem is: logger initialization should be the first thing the program does but I can't initialize the logger until I determine where the user wants the log to ...
I am trying to find a name for this architectural pattern that I have seen in many places before: Poller - (There are a number of these) These are either plugins or services acting on there own communicate with equipment of various sorts collecting data and pushing that data to a central service in a normalized form. ...
Related: Should every git commit leave the project in a working state? Suppose I make the following commits locally: Modify the database schema, breaking the application. Update the application so it is compatible with the database schema again. As long as I push both commits, master remains in a working state. Howe...
I'm thinking about curiously recurring template pattern. I find it quite useful, and it's pretty well adjustable for many tasks. But I have to admit, I don't see much of CRTP code in the wild. Is it hard to grasp? Are virtual functions easier overall? Shouldn't it be used for 90% of cases where virtual keyword appears?...
My current project is part of a highly linked architecture, with individual systems each owning certain pieces of data, and exposing them RESTfully. Both our web services and our user interface take advantage of this linkage, storing links to the resources in other systems rather than storing a copy of the data, and pr...
When I do database table design, I often wonder if I should try to make the table as simple as possible, or if I should make the object as clear as possible. The requirement is to store all month of the year's salesTon and gross profit. I design from the object.The object has fields year, month, salesTon and gross prof...
We have a scripting language that we use internally for many things. It began as a simple evaluation statements for dynamic labels to become a Turing complete language used pervasively throughout our system. Problem is that it was never designed for this and it shows. Development environment is anemic, scripts produc...
Is there a way to measure the success of an agile project as it relates to a well defined outcome?  For example, I've pair coded Conway's game of life with 12 people using TDD, and each time it was different, but the goal of implementing a fully working version of the program was the same everytime. Clearly that's an e...
My task is to implement a distributed semaphore system (links to description) and an application for it. I will be using Java sockets, and it will use watermark arrays and priority queues (not sure where), and so I am curious about how to tackle this project. Specifically, I'd like to know what is a good first-step goa...
In my application, I'm getting product information files from an FTP server. They are text files that have been ZIP-compressed. At first, I thought uncompressed the file on the server then reading the text over the web would work, but the uncompressed files are ~900 MB, making it slow and inefficient while causing out-...
I have been searching for an example over the internet that shows any operation like saving a file or drawing anything in UI or any other sort that shows the implementation from High-leve language code to Low-level code to deep down machine level code. The basic idea is to explain the computer working in a nutshell. Li...
I am new to Java; through my studies, I read that reflection is used to invoke classes and methods, and to know which methods are implemented or not. When should I use reflection, and what is the difference between using reflection and instantiating objects and calling methods the traditional way?
We're teaming up with some non programmers (writers) who need to contribute to one of our projects. Now they just don't like the idea of using Git (or anything for that matter) for version controlling their work. I think this is because they just don't find it worthwhile to wrap their heads around the twisted concepts ...
I have been working with a complex system written with Java. It is made by with many java programs and many shell scripts which call them and some cronjobs to schedule them. The system is hard to maintain. Input/Output/Error/OK files were distributed in different place of the system by the hands of different programmer...
We have a web application which contains a web service with over 50 methods. The application is currently installed at a number of sites and is currently being maintained by one developer. The application is currently a single user system where all the data is stored in XML files. One of our main tasks is to make it a ...
A bit of background The company I work for has been creating database applications since around 1980 and, until relatively recently, most of these systems have been stand-alone "silo" systems. However, in the last few years, we've seen more of a shift towards gathering "intelligence" across all systems within our cust...
I am planning to use boost libraries, as it is quiet rich, and will save lots of time. But my question is, what are the guidelines i have to follow, so that I can replace some part of boost with standard C++ as and when they are supported, considering so many new features are coming in C++11. Also, how to encapsulate...
I have this new customer, that has this PHP App. It was written by a single developer that wanted to "make yet another framework" back in 2005. About 3 Years later the developer left the company, and with him all Knowledge on what this thing is actually doing. Now, as the App already went in production the manager jus...
So there is an insurance company which wants to move long term its proprietorially written software for different insurance products to a new platform / framework / concept / something. One of the applications is ~700 pages big. We would require some workflow application (ibm websphere products?). Transaction control, ...
I'm having trouble generating a proper database design for bill of materials in EF Code-first I just need a general structure then ill add additional fields So i need to have a Product that is assembled from other Products which are assemblies of other Products. Example: Product 1: Aluminum Box 1x Aluminum Sheet 4x ...
My department is planning on working on our next several releases (spanning a year) simultaneously. The powers that be are advocating we support this by refactoring all affected code into classes like AbstractGizmo, R1Gizmo, R2Gizmo, etc and use configuration (via Spring and/or ANT) to control which classes are used i...
I do quite a bit of ASP.NET work (C#, MVC), but most of it is typical web development. I do Restful architecture using CRUD repositories. Most of my clients don't have a lot of advanced requirements within their applications. I'm now looking at node.js and it's performance implications (I'm addicted to speed), but I ha...
A presentation linked in an answer here demonstrated a comparison of several web development frameworks. It was a good comparison but caused me a little worry based on the technology stack that I have been pushing for awhile now at my current company. While it seemed like the author was biased towards RoR, he pointed ...
I was looking to add a simple form that states my project's build number on a form to quick identify what version I am running. Then I realized I'm not sure what fits on an about page. In my highschool projects I would make silly splash screens with this info, with images and other unnecessary information. What are sta...
I like the concept of System.Tuple in that it allows me to return multiple parameters in a single function call without instantiating a new class, however does this defy any good programming practices such as Microsoft Patterns & Practices, SOLID Principles, etc. I'm just trying to gauge how liberally I should use thi...