instruction stringlengths 34 36.1k |
|---|
I found myself struggling to see what is this principle about and why is it so important for language design.
Basically, it states, that for every expression expr in language should be exactly the same as this construct:
(function () { return expr; })()
Also, I have heard that Ruby obeys this principle, while Python d... |
Will the GC take care of all memory management issues (memory leaks) ?
Is there any case where you don't want the GC to take control of some part of your code ?
|
Are there any domain models already created for education industry? For example we have Prima IBCS for insurance. I was looking for something along similar lines.
|
I read some books about software architecture as we are using it in our project but I can't classify the architecture properly. It's some kind of Enterprise Architecture, but what exactly... SOA, ESB (Enterprise Service Bus), Message Bus, Event Driven SOA, there are so many terms in Enterprise software....
The system i... |
I've read Steve McConnell's "Code Complete" and one of items in checklist for requirements is: "Is the definition of success included? Of failure?".
Why is this important? Can you write any examples of those definitions? Can anybody provide examples of good requirements specification?
|
My teacher just told me that whenever I create a class to run something for a video game company that uses Eclipse, I should make a run class with the main and any outputs. He says any arithmetic should then be put in its own class. Here's the example he gave us.
//triangle
import java.util.Scanner;
import java.lang.M... |
There are those tags which have immediate effect (< br >) and those which affect what is between them ( < a > < / a > ).
Closing tag is verbose, and I believe also redundant:
<tag parameters> ... </tag>
verbose
Compare to LISP's s-expresions.
(tag parameters)
redundant
Ending tags are not even necessary. These lang... |
I read, that Smalltalk was designed for kids or for education. So was it good at it? Better than the other languages? Was it good/easy also for average kid (I read that bright kids enjoyed). Is there any study to back it up? Or is Your experience it is good?
|
Our code is bad. It might not have always been considered bad, but it is bad and is only going downhill. I started fresh out of college less than a year ago, and many of the things in our code puzzle me beyond belief. At first I figured that as the new guy I should keep my mouth shut until I learned a little more about... |
I've been trying to go over my tuple calculus over and over again. What's worse is that my professor and tutors are not much help during their hours.
Does anyone know a good place to learn about tuple calculus? I'm having a hard time understanding how to "speak" the language in terms of what I want to get from a datab... |
I have thousands of .xml files from size 1MB-45MB (no DTDs). I need to parse and further manipulate these XML files before generating separate .xml files with the results of my regex.
What the fastest open-source XML parsing library for C++? Aside from the parsing library, what other approaches can I use to speed up XM... |
Consider the following code:
DerivedClass drbObj = (DerivedClass)obj;
Here obj is of type Object and this is reasonable since Object is the base type of every Class in C#.
Here, since the type of derObj is defined at compile time, what is the need to explicitly use type conversion here. Can't the compiler predict on i... |
I am trying to do some design in Blend 4. The sample data function of Blend is nice to have during design time, but it could be much more better to see the design in browser.
Can anyone help me to use sample data created by Blend as real data (see same data in browser) also ?
Thanks in advance.
|
How much do you, as .Net developers, consider the changes between Windows XP, 7, & 8 when choosing your development environment and libraries?
We are nearing the end of Windows XP; Windows 7 is noticeably and aggressively making it's mark; Windows 8 (Win R/T) is on the horizon. Granted, flexibility is completely expec... |
There are a number of questions on this site that give plenty of information about the benefits that can be gained from automated testing. But I didn't see anything that represented the other side of the coin: what are the disadvantages? Everything in life is a tradeoff and there are no silver bullets, so surely ther... |
Here's an interesting discussion of Tennent's Correspondence Principle, and a brief description from Neal Gafter:
The principle dictates that an expression or statement, when wrapped in a closure and then immediately invoked, ought to have the same meaning as it did before being wrapped in a closure. Any change in sem... |
Is there a duration limit for FDD Project when those projects are likely to fail due external and internal factors?
For example XP projects should kept short due the openess of the concept and dependents on the individuals in the team and lack of documentation which is vulnerable to disturbances like losing team member... |
I want to make User Manual/Help to my program. I found two good ways - XML or HTML - which should I use and why?
I know how to do it in html (I know how to use js, css and such) but in XML it's harder (or I imagine?)
anyway which way should I choose and why?...
Edit:
There's one important thing I forgot to mention: I n... |
I am in the process of implementing a small web application using memcached for caching objects and sql server for database persistence.
In all the projects I have done before I have done inserts/updates in the web thread itself. In this project I want to implement asynchronous inserts and updates. I will use memcache... |
In the .NET world, I was able to find several industry figures or luminaries' blogs to read or to follow on twitter to learn about features and trends. Moving into the iOS realm, I'm kind of surprised how difficult it has been to find analogous resources.
What resources should I be reading/following/osmosing to get be... |
Lately I have been struggling to understand what the right amount of checking is and what the proper methods are.
I have a few questions regarding this:
What is the proper way to check for errors (bad input, bad states, etc)? Is it better to explicitly check for errors, or use functions like asserts which can be optim... |
We have an OOP course at our university, while discussing the concepts I came across MetaClass and Delegation. As far as I know, these don't exist in C++.
Could someone give an example by which I can better understand how to simulate them instead.
|
I'd like to know the Agile stance on the following situation:
A contractual, payable milestone states a working version must be installed and run at customer's location;
Development is still ongoing, not all user stories and issues are addressed;
A later deployment will be required
My understanding was that the produ... |
A Red/Black Tree is one way to implement a balanced binary search tree. The principles behind how it works make sense to me, but the chosen colors don't. Why red and black, as opposed to any other pair of colors or of attributes in general? When I hear "red and black," the first things that come to mind are checkerb... |
This is my first question. I love Mathematics; I love the logic and the problem solving. At the same time, I enjoy Computer Science and hope to go into Artificial Intelligence research after I get my Bachelors degree, i.e pursue a PhD in Computer Science. Are there any advantages of having a firm grasp of Mathematics t... |
I've been doing TDD with a project I'm working on, and I have quite a large number of tests. I have quite a few automated tests around restrictions enforced in code, making sure things that shouldn't be allowed aren't allowed. Now I've been told that due to changes in our licensing model, some of those restrictions n... |
I am currently teaching myself Python, using the GNU licensed book "Introduction to Computer Science using Python."
In chapter 3, functions are covered. While I understand the concept of functions and how they simplify code by executing a defined sequence of statements whenever they care called, and that Modules are c... |
"A/B testing" is defined as "a method of marketing testing by which a baseline control sample is compared to a variety of single-variable test samples in order to improve response rates".
The point here, of course, is to know which small single-variable changes are more optimal, with the goal of finding the local optim... |
If I understand correctly, there was a huge birth of programming languages during the early decades of computing, but then things have stabilized.
Basically, why are many universities and industries still using languages such as C and C++ (which were created decades ago), when there have been plenty of decades since th... |
In some cases, I fail to see that a problem could be solved by the divide and conquer method. To give a specific example, when studying the find max sub-array problem, my first approach is to brute force it by using a double loop to find the max subarray. When I saw the solution using the divide and conquer approach wh... |
I have been browsing some OpenJDK code recently and have found some intriguing pieces of code there that has to do with bit-wise operations. I even asked a question about it on StackOverflow.
Another example that illustrates the point:
1141 public static int bitCount(int i) {
1142 // HD, Figure 5-2
... |
I have spent the best part of a month working on the jQuery Calendar plugin.
The setup is such that all the calendar entries are stored in a table inside SQL Server and im using a single "Select As" statement to construct the json data within the SQL query itself.
This has an execution time of less than one second. How... |
I've been a software developer (whether part time or full time) for almost 3 years. I've always been the type of person to have that knack for taking a lead on things, and providing the organization around getting things done. Ever since I was the lead on my senior design project back in college, I felt that this was m... |
I have diagnosed ADD. Mild but enough to affect my work:
Easily distracted
Can't concentrate on one project at a time
Addicted to the web
Procrastination
etc.
What strategies do you use to compensate?
One clarification
I have real ADD. I was diagnosed with it when I was a child and have wrestled with it all my li... |
I use quite some "non-commercial" applications when working on software projects. For clarification, I mean developing applications here, for example smartgit, not libraries or anything that gets shipped.
Is it legal to provide a donation button for projects made using the non-commercial of certain applications?
I know... |
I've worked with a number of professional teams and it seems that class code structure ranges from highly organized to completely cluttered. I did a project with the State of California recently and they required using specific Regions in my VB code, along with inline XML comments for auto-docs. It was very structured,... |
A bit of context: I'm in 3rd year of college. students are divided into teams of 4. Almost everyone will be working under windows (except a few like me who are on linux). As part of the school curriculum, we will soon start working on a project for a real client, but me and another team are wondering which way would be... |
If I understood, the actor model is just like the object model, but with a few differences:
EVERY object spawns it's own separate thread and its not a problem even when you have thousands of objects.
Actors don't interact by calling functions and getting return values but instead by sending and receiving messages.
If ... |
Has anyone ever tried Freelancer.com (former GetAFreelancer.com)? Does anyone have any opinions/feedback on the site?
I would like to start some projects as a freelancer but I would really like to get some opinions on the site to get started.
|
I've seen people do neat little PowerPoint shows that show data flowing in and out of a system that they use to wow a customer.
Is this something you've done before? like show data in from source 1 and out to source 2?
I've used mockups and DFD's but never presented anything in motion and I wonder if that adds value o... |
I am interested in learning of the different procedures and environments it takes to maintain a large application. For example, in my case I use a CentOS local server, where I develop my applications and I use a version control system on some applications, then I upload it to my host-gator account and launch it live.
I... |
When an application allows emails to be sent to it to either reply to comments or add todos, trimming those emails for just the relevant text becomes a problem, since there are many different standards. Many times you'll end up seeing things like this:
Hey Joe, good to hear from you. Let me know when you'll be back ... |
SSL certificates often advertise varying amounts of warranties or guarantees, for example $500,000 or $1m.
My question is, in the history of SSL, has anyone ever actually successfully claimed one of these warranties? Has there ever been a case? If not, is it fair to assume they are just marketing gimmicks?
|
As a result of the comment discussion here, I wonder whether you can learn Functional Programming in C?
|
SO has quite a few questions using the word "truthiness" to mean the truth value of an expression, when evaluated as a boolean, regardless of its original type. It's very useful in dynamic languages.
So my question is, is this a real term, and if so were we using it before Stephen Colbert made it popular? Or did we jus... |
I know a little about how to use message passing and shared memory, but I still don't know when to choose one or another.
Can you tell me about their traits (not the implementation)?
|
When it comes to line length, Google's Closure Linter, Prettier, etc recommend not exceeding 80 characters per line.
Can anyone recommend the max number of lines per file?
I think most would consider a file with 100 pages of code, or 1000 lines to be too large
|
I can not see why the heapsort is considered an inplace sorting algorithm.
I mean an extra data structure populated with the elements of the array to be sorted i.e. a heap, is used to assist in the extraction of the min value and the sorting process.
So may be I am misunderstanding the definition of inplace here? ... |
I'm considering re-reading Steve McConnell's excellent "Software Project Survival Guide" and perhaps applying it verbatim to my next project. However, one thought struck me: the book was written in 1998, before Scrum and other agile methodologies became popular.
Are the teachings of this book still relevant in light of... |
I participated in a coding competition today, and I found that almost all of the command line input our programs needed to receive would start with an integer representing the amount of data sets to follow. There were 6 different problems, and they all started this way.
For example, one sample problem had:
"Input to t... |
I have two questions:
Question #1: Is there any well known project to VBify C? VBify here means to make it as easy as in VB.NET and to make C well supported in IDE just like VB.NET, i.e. with following features: word completion, function's argument description and everything just as with VB.NET development using Visua... |
I am building an app that communicates with my website with ASIHTTPRequest to a PHP-based REST API on the server side.
Naturally, in my app I have different endpoints on the server side, and usually return JSON data.
Is it unethical to log counters on how many times each endpoint was hit?
I'd like to capture how the a... |
(First of all, I should make clear that compilers and virtual machines (aka) are a completely unknown field for me)
As I understand it, every time a Java/C#/... application is run, a VM is invoked and translates intermediate code (bytecode, CIL, etc) to machine instructions.
But why can't this operation done only once ... |
I am working on an iPad app. It needs to contain some very large files. I could put them into the app, but they would push it well over 20MB, which means that it would not be downloadable over the air -- only via iTunes.
Is there a way around this without too much pain for me? I don't have a server or anything like ... |
I have started an open source project and would very much like to have a cute and catchy icon to label the project with. My dilemma is that I have little to no experience designing vector graphics for use in such a project. To compensate I thought I might purchase a graphic from one of the stock photo service (shutte... |
I understand the difference between syntax and semantics -
Syntax: how the symbols are combined to form a valid expression or statement.
Semantics: the meaning of those symbols that form an expression or statement.
But what is the grammar? For example: sometimes I hear people say that some construct is "grammatically i... |
I've been trying to experiment with coded user interface testing (CUITS) lately and I get the following error whenever I try to create one.
The following package failed to load: C:\Users[File Path Goes
Here]\Microsoft.VisualStudio.TestTools.UITest.Extension.IE.dll. Coded
UI Test is now in an inconsistent state. Re... |
I feel like anything that can be developed using OO/functional languages can be generally made 'better' using a prototype based language, because they appaer to have the best of them all: high order functions, flexibility to simulate any OO structure, productivity (low verbosity) and scalability because of concurrency.... |
I'm a project manager for a team of firmware engineers making the transition to adopting Scrum and I'm moving to support the team in a Product Owner role. We've just gone through Scrum training and are beginning a month of coaching which is going to be invaluable. Coming from a technical background I can already see th... |
After having seen (and asked!) so many questions similar to
What does int (*f)(int (*a)[5]) mean in C?
and even seeing that they'd made a program to help people understand the C syntax, I can't help but wonder:
Why was the syntax of C designed this way?
For example, if I were designing pointers, I would translate "... |
I don't understand why Java uses the reverse of a (probably hypothetical) domain name as the name of a package, while mostly there is no connection between the domain name that some people uses and the products that they have. A lot of developers don't even have any domain.
What are the reasons of this naming conventio... |
my question is rather a matter of English language. For proper commenting my code I want to know when you do for example the following code, what comment you can write for it?
public class TestClass
{
public double volt {get; set;}
public double curr {get; set:}
}
Somewhere else in the same namespace
public c... |
I wanted to know the experiences others have about doing the Agile way of "Release Early, Release Often" with iPhone and Android Apps. Its not a problem with webapps as the update happens at the server and user does not have to do anything specific for updates
It may not be a big problem with Android, as the approval p... |
I was wondering what is the reason behind pagination? Is it used because it lessens the burden on the servers since we would technically limit the amount of rows returned per page?
I wanted to do something without pagination but given that I am new to this (I am an amateur) started wondering if its OK technically or no... |
By researching around (books, Wikipedia, similar questions on SE, etc) I came to understand that Imperative programming is one of the major programming paradigms, where you describe a series of commands (or statements) for the computer to execute (so you pretty much order it to take specific actions, hence the name "im... |
Thinking about Kanban, I realized that the queuing-theory behind the SW-development-methodology obviously also applies to concurrent software. Now I'm looking for whether this kind of thinking is explicitly applied in some area.
A simple example: We usually want to limit the number of threads to avoid cache-thrashing (... |
It's understandable that after a big development effort, some OSS authors deem reasonable that the project users should make an effort too in order to get started.
Can the source code effectively be the project's documentation? Does it need to be structured in a particular way in order to achieve this? And how often is... |
I have heard several times that every programmer should learn one of each type of language. Now, this is not necessarily true, but I believe it is a good idea.
I've learned a Procedural Language (Perl), but what are the other types?
What are the differences between them and what are some examples of each?
|
Following the Pareto rule, a programmer spends only 20% of his time for really useful things.
I spend 80% of my time debugging, fixing small things to get everything working.
Is there a way to spend less time debugging?
|
We currently have a 'global catch all exceptions' section in our application. When an uncaught exception is thrown, the stack trace is displayed and the application continues running.
More often than not, this leaves the state of the application invalid going forward. Especially with NullReferenceExceptions, and thre... |
I ran across a problem where goal was to use dynamic programming (instead of other approaches). There is a distance to be spanned, and a set of cables of different lengths. What is the minimum number of cables needed to span the distance exactly?
To me this looked like a knapsack problem, but since there could be multi... |
I'm porting to C++ and adding a lot of functionality to a numerical application written in Fortran 77. While I hate F77, I have to admit that the thing goes very fast. Now, I'm implementing practically the same structure and algorithm, but nevertheless the difference in the execution time is noticeable. Not big, but it... |
Is it good/bad practice to do the following:
public class MyClass {
public MyType MyProperty { get; private set; }
public void SetMyProperty(MyType myProperty) {
MyProperty = myProperty;
}
}
My intention is to prevent MyProperty from being accidentally changed outside the class. However, it can be changed i... |
I started to write a hand written parser just for fun. For simple rules it is working, but I have problem with the optional grammar rules. I marked the optional rules with a question mark.
Here is a simple rule:
rule1: "AA"? "AB"? "AC"? "AD"
So AA, AB and AC string is optional, but AD is required.
ex.:
"AAABAD" is ma... |
This is how my solution looks like right now. And it get's to the point where my Controls need reference to Model. It get's real tough to keep Infrastructure, Constants, Controls and Model separated.
For download size and modularity MAIN and Modules (there is many) will stay separate. But those core libraries seem to b... |
Possible Duplicate:
What does the suffix after software engineer/developer job titles mean? (i.e. Software Developer III)
work advancement titles
I've been struggling to understand job hierarchy in software engineering.
The system is further complicated because of the lack of consistent naming conventions when assig... |
I just want to know how long would it take me to become proficient enough (in let's say C#) in order to be able to get into the job market as a junior/entry level programmer. I have read all those articles and discussions about "how long would it take" but the answers always seem to be like "...it will take you two wee... |
I want to know whether saving row count in a table is better than counting it each time of the proccess.
Quick Example : A visitor goes to Group Clan, the page displays clan information and Members who have joined the group,Should the page look for all the users who joined the clan and count them, or just display the n... |
as a programmer I live with Trac, how do you go about accessing trac projects via a mobile phone, nokia/android/iphone/windows mobile, the mobile platform is not important, I can get a new phone but trac is there to stay.
|
Steve Yegge mentions it in When Polymorphism Fails:
... I think this implies that type is best represented via properties rather than classes, because of the inherent inflexibility of classes. But in "traditional" languages like C++ and Java, this makes code sharing a bit harder, because of the lack of support for syn... |
I have been modifying an application to have a cleaner client/server split to allow for load splitting and resource sharing etc. Everything is written to an interface so it was easy to add a remoting layer to the interface using a proxy. Everything worked fine. The next phase was to add a caching layer to the interface... |
I was wondering, is there an economic rationale in developing and marketing a small tool (standalone or rather plugin)? Of course, let's assume that the tool does indeed solve a real problem from the production process. And by small, I mean an application that can be developed by 1-2 developers within 2 years. Do you k... |
I'm a java developer that is tasked with creating some scripts that will handle large xml document file transfers by hitting some web service api's from windows xp client machines. There may be other document formats involved like .pdf, .doc, .xls or .txt, but I'm not sure on that at this point.
I've looked into power... |
I seem to be repeatedly stuck in a situation where release dates are set not based on anything technical, but because someone in Sales has committed to a customer by then. Based on discussions with friends in development at other companies, the same thing seems to happen.
"Here is the committed feature set and here is... |
I feel that the often seen C/C++ doesn't really describe my skills in my CV. So I'm planning to separate it into advanced C++ knowledge and mediocre C skills.
Do you think this is confusing for the reader? She could think: "C is a subset of C++, so what is this guy trying to tel me?" Well, what I'm trying to tell is: I... |
In order to create a (Lucene) query, an "incomplete" domain object is used. All properties with a value are used for the query, the rest is ignored.
In the absence of a better name, we call it "search by example", but as with many other "original" approaches there is probably a (standard/agreed upon) name for this ap... |
Possible Duplicate:
Which problems domains are more suited to functional programming solutions
I've been reading about functional programming. I've been using mostly C#.net recently, and I would like to know of a good real-world example of where a functional language such as Lisp or F# would be a clearly superior ... |
Normally what happens is that I work on something for a while and then when I am done I check it in(After the test/review process of course). Sometimes I have to go back and fix something that I got wrong the first time due to me not understanding the problem enough, lack of testing, etc..
What is an acceptable rate f... |
I have read that the Model is responsible for maintaining state among HTTP requests, for example in this article:
The Model is responsible for maintaining state between HTTP requests.
Basically any data whether on a database, in a file, stored in the Session, or cached inside APC must be preserved between requests an... |
In a lot of cases I might have an existing class with some behavior:
class Lion
{
public void Eat(Herbivore herbivore) { ... }
}
...and I have a unit test...
[TestMethod]
public void Lion_can_eat_herbivore()
{
var herbivore = buildHerbivoreForEating();
var test = BuildLionForTest();
test.Eat(herbivore)... |
I am reading (Cormen) on counting sort.
I understand the structure of the algorithm but the statement:
In practice, we usually use counting sort when we have k = O(n), in
which case the running time is Theta(n).
Is not clear to my mind.
k is just the range of integers expected in the input.
Why is the asympto... |
We are currently working on our new product/project, it is a client-server application directed towards certain specific industrial/service enterprises. We are building a server (C Language and Linux Only) running a custom protocol on top of TCP with a Java front-end. We are about 20% into the coding work and are faced... |
I need to be able to demo our production application to prospective clients. The way I have it setup today is simple. The demo application is an exact duplicate of the production system, except that the data in the database is obfuscated to protect our current clients' data. This works great because it doesn't requir... |
Should ActiveRecord-based domain models have visible properties? Why or why not?
My experience and studies have always lead me to believe that object properties should always be protected, and that data should only be manipulated/accessed through methods. This ensures that if the internals of the class need to be refac... |
I've seen a lot of talk about how awesome Node.js is for realtime web apps -- things that need sockets, Comet, AJAX-heavy communications, and so forth. I know that its event-driven, asynchronous, thread-driven model is also good for concurrency with low overhead.
I've also seen Node.js tutorials for more simple, 'tradi... |
I have been reading "Clean Code" by Robert Martin to hopefully, become a better programmer. While none of it so far has been really ground breaking it has made me think differently about the way I design applications and write code.
There is one part of the book that I not only don't agree with, but doesn't make sense... |
This is a legal question with mixing code I've written in my own time with code I've been paid to write for an employer.
I'm employed at a company with an employment contract, and am paid hourly. This is in Ontario, Canada in case that that affects matters.
I've been working on a project for my employer, and in this pr... |
Is Entity Framework 4 a good solution for a public website with potentially 1000 hits/second?
In my understanding EF is a viable solution for mostly smaller or intranet websites, but wouldn't scale easily for something like a popular community website (I know SO is using LINQ to SQL, but.. I'd like more examples/proof... |
I am thinking on creating a Mercurial repository under a Git repository.
e.g.
..../git-repository/directory/hg-repo/
The 2 repositories
Is it possible to manage (keeping your sanity)? How similiar is it to this?
I am a computer science student at University. I manage my work in Git, mainly as a distribution mechanism... |
We have outsourced the html and css design to an external company. We want to make sure the quality of code is good. What benchmarks can we set to achieve this.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.