instruction stringlengths 34 36.1k |
|---|
Say you have the following forloop*:
for (int i = 0; i < 10; ++i) {
// ...
}
which it could commonly also be written as:
for (int i = 0; i != 10; ++i) {
// ...
}
The end results are the same, so are there any real arguments for using one over the other? Personally I use the former in case i for some reason go... |
With a for loop you can move the post-statement empty and move it to the bottom of the code in the loop:
for (int i = 0; i < 10; /* empty */ ) {
//...
++i;
}
But in this case it doesn't gain you anything; more importantly it makes the code harder to read as you would expect the ++i to reside at the top of the ... |
From your experience in developing mobile apps, which mobile development platform is easiest to develop? iOS, Android or WinPhone 7? And why would do you think it is the easiest? If you can order it from easiest to most difficult it is even better.
|
I have a Java project that is getting to be relatively large (a few thousand lines in all, I'd say). It's definitely a lot larger than what I've dealt with before, being that I am still a relatively new programmer.
I have a class structure with my swing components and other classes I have made that, more and more, is ... |
I'm learning C as my first programming language. I'm confused on how do loops work in real-life. In programming every function has a reason.
example - if/else statements are used if we have conditions. Nesting if/else statements are used if we have conditions inside a condition(more condition).
I am going to try my b... |
I just wanted some advice regarding the MVC way of doing things. I am using codeigniter and I was wondering if it's better to have one controller per page for a website or to have one controller for all the pages?
Let's say I have a simple website where you can visit the homepage, login, create an account and contact ... |
What does "downstream/upstream design" in software development mean?
|
I am writing a web based application that needs to have some elements of CRM in it but I cannot use an of-the-shelf CRM to do what I want. (Honestly we have been through it all and it will not work).
Now while Tasks, Calls, Meetings and Notes are straightforward the idea of reinventing Mail and Calendars seems a waste ... |
I was just having this idea once and wondering if there's any possibility to harness the power of p2p distributed computing to make a virtual supercomputer with the following features:
Works like a normal machine but uses
networked RAM
Normal applications should be able to work on distributed environment dividing load... |
I have an idea for an open source project. It's about building developing tools for software developers. Yet I have never joined a development team and now I don't know much about these teams except the fact that they exist ;)
My questions are:
Is there c# open source projects team? Where?
How can I offer my idea / c... |
I am taking over the maintenance of a simple commercial website, images and information are displayed. I have experience with html, php, word press, javascript, java, and such.
What should I ask the previous dev for when it comes to taking over the maintenance, hosting, files, testing, deployment, etc? Also how much ... |
Metaobject protocol is protocol for metaobjects in a programming languages. Although I understand it on simple terms, I want to know the reason and a summary of real world usage patterns of this protocol. So, why exactly is metaobject and more importantly metaobject protocol is such a good idea. I want to know the prob... |
Why do many open source projects collaborate primarily through mailing lists rather than through, say, forums? I may be ignorant in my assessment, but I, along with my communication teacher, think mailing lists are rather inefficient:
It's hard to reference old messages. You have to wait until an archiving site pick... |
I introduced Mercurial to my department. I love it, but it is my first version control experience. I am using it with NetBeans PHP for web development.
Another developer who works on internal company applications likes using Visual Source Safe and does not want to switch. He works in a Visual Studio environment.
All th... |
One of my friends has worked for nearly 10 years, asked me why he needs to learn new things such as unit-testing, MVC, Multi-tier architecture (he creates 3-tier application but designs like 2-tier), Object-oriented programming or etc?
He has worked for a decade without unit-testing, uses code-behind and structure prog... |
What do you consider good use of wrapper functions? When are they useful abstractions and in what cases harmful and unnecessary complexity?
|
I have a website built using a MVC.NET framework with C# that uses some shared views and partial views. In order to display the views properly there is a bit of code that must reside in the controller. Currently I have that logic duplicated between controllers.
An example would be an view that takes in an error id ... |
Arguing for code generation, I am looking for some examples of ways in which it increases code quality. To clarify what I mean by code generation, I can talk only about a project of mine:
We use XML files to describe entity relationships in our database schema, so they help us generate our ORM framework and HTML forms ... |
I'm working on a small tool as a toy project to show the difference between two directories, showing which files/directories were added, removed, modified, etc.
I was trying to represent these changes as simply 'ChangeItem' objects, without distinction between whether it was a file or directory. However, that created a... |
To extend from the question things like googledocs can handle word, excel and powerpoint so why aren't all programs being moved to web applications with the use of smartphones(blackberries, iphones and androids) and tablet pcs(ipad) increasing why isn't there a move to get every program browser based? With the increase... |
In the last two years I have worked with a poorly written codebase of nearly 40K lines of code. Over that time I have made many small refactorings to improve it and made some bigger, as time permits.
Unfortunately, I still view the codebase as poorly written.
What's your experience? Do you think many small fixes can ta... |
I’m curious to know how folks deal with comparative code reviews (version x against y of a file) in the presence of strong type inference, that is when ‘var’ (in C#) or ‘auto’ (in C++ 0x) is used in place of the older more verbose (explicit) type declaration.
When IntelliSense is available one can just float the mouse ... |
Software development techniques exist to solve problems. I think a key problem we face is conquering complexity. Also, software developers must often classify and understand complex systems, separating accidental complexity from essential complexity. I believe that sufficiently useful definitions of these terms all e... |
I have noticed lately that functional programming languages are gaining popularity. I recently saw how the Tiobe Index shows an increase in their popularity in comparison to the last year although most of them do not even reach the top 50 most popular languages according to this index.
And this has been the case for qu... |
So many free software projects have beautiful art, specially websites, that I wonder where the coders meet their artists. Is there some place to ask for this besides the local art majors' schoolboard? I thought of IRC, but I fear that one might actually bother the small and frequent userbase by asking it there.
|
Question
Please explain Feature Driven Development in a nutshell?
Situation
My Business Analyst calls their documentation FDD, but it just seems overwhelmed by details.
In a Nutshell
An 'in a nutshell' example would be good, since I'm trying to reduce unnecessary detail and confusion. I want to add clarity, and an Occa... |
I really value unit-testing in developing webapps. I haven't had any experience in developing mobile apps. Is there anything that cannot be unit-tested in mobile apps? And what is the workaround for this? Is there any common gotcha that we must be aware in unit-testing mobile apps?
|
Can I design my program so that it will automatically change OS's hotkeys parameters? I mean, when installing a program, it will set the hotkey of OS so that if you press them, the program itself would run. (Linux/Windows)
|
Sorry if the title sounds a bit clumsy.
The scenario I am trying to describe is during my academic years I have mostly coded in C/C++. Few small projects were done but no large scale work was done. From there on, after entering industry, I rarely code in C++ but whenever I do, I use its features as deep as my understan... |
Our in house software has been used for many users and the training department asked us for any tips of end user documentation format.
Does any know where can I find good examples of software end user documentation that a training department to use for inspiration or any sites with good advise?
This is similar to this ... |
One of the five people who interviewed me asked a question that resulted in an hour-long discussion: "Explain how you would develop a frequency-sorted list of the ten thousand most-used words in the English language."
My initial response was to assail the assumptions underlying the problem. Language is a fluid thing, I... |
I've been looking for functional language with C-like syntax and static typing. So far my choice would be Nemerle. Is there anything else/better?
EDIT:
second choice would be Lua or Go.
Any pros and cons?
|
Why should an organization adopt the unified process over others? What are the relative advantages? I know that it is closely coupled with UML, but clearly this cannot be the only advantage. Why choose this approach over others?
|
I was reading the book "Functional Programming for the Real World". It started with comparison between imperative and functional programming languages. And it stated how 'values' and 'expressions' in functional programming is different from 'variables' and 'functions' of imperative programming. From the discussion I so... |
Is it compulsory to have an Android device to learn programming for Android ?
Currently, Java is my primary programming language.
|
I am somewhat new to programming and the best way I can ask this question is with an example.
I know how to do basic things in Java and C#. Things like a small windows forms application or make a generic class. I've basically been learning and haven't tried to do anything big yet. Anyways, I've always been curious abo... |
We've all seen (and most of us have written) plenty of poorly written code. Why? What makes us adopt poor practices rather than good ones?
The most obvious answer (to me) is "ignorance", but I'm sure that isn't the only reason. What others are there? What can we do to overcome the temptation to write bad code?
|
QUESTION: How can you re-write the questions of the Joel test to apply to web developers?
1. Do you use source control?
(source control for all aspects of your app, including configuration, database and user-based settings?)
2. Can you make a build in one step?
(can you deploy a site from staging to prod in 1 step?)
... |
Why do programming languages like Ruby use symbols? I understand that String manipulation is much slower than using a lookup table as well as the idea that Strings are reallocated in memory no matter if it is the same or different as one used previously, but can't interpreters compensate for this? It would seem like an... |
Are there any A.I. resources that explain the concepts and present source code, similarly to AI Horizon?
I've read books and research papers but they generally present a conceptual approach, without really delving into the source code of it.
|
I am writing a report which requires the analysis of performance of each individual team member. This is for a software development project developed using the Unified Process (UP). I was just wondering if there are any existing group & individual appraisal metrics used so I don't have to reinvent the wheel...
EDIT
Thi... |
This one has haunted me for so long. When doing MVC programming what do you think is the better programming practice? Should one use fully populated models or the partially filled ones, especially when I know that for this particular task I am going to need only 2 fields from the model object which has 5 others?
Someti... |
I was just thinking about pair programming and one thought just crossed my mind that surely at some time two coders are not going to agree and it would kind of turn into a lengthy (maybe heated) discussion about an implementation of a paradigm or algorithm, etc. I expect these might be 'religious' wars over stuff? Does... |
Does anybody have real life examples where they regularly solve NP complete or NP hard problems (by heuristics, or chasing a suboptimal solution or whatever) in their job? I know they occur in scheduling, planning, VLSI design, etc., but I am trying to get an idea of the major industries employing programmers or engine... |
In my understanding, the partial keyword does nothing but allow a class to be split between several source files. Is there any reason to do this other than for code organization? I've seen it used for that in generated UI classes.
It seems a poor reason to create a whole keyword. If a class is big enough to require mul... |
In this paper, it is recommended that one document the following:
module structure
module interfaces
If I'm writing detailed module structures and interfaces in a standalone document, aren't I repeating work that is also done with object declaration statements, unit tests, and docstrings?
If so, and if this is bad r... |
I have personally never done this. I don't understand why so many sites do, if you do your development on a development server why would you ever need to shut down your production site?
I have always wondered about this.
What are they doing during this time, what requires doing this?
|
For custom software, when you are giving your customer an estimate, how much detail do you tend to include?
Do you:
break it down into small tasks that can be done in a few hours and give them the full list?
give them one big number and work towards that? And if so does that come from a more detailed estimate that ... |
Do you believe there is a gap between computer science research and software engineering problems? For example, do software engineers ever have to worry about "factoring and graph isomorphism" or some complex computer science problems if they have to....say build a shopping cart website? Probably not.
And if there is... |
Does Java license allow other companies to create their own versions of Java language or just implement it accurately? Same question about JVM.
I heard about Sun suing Microsoft for changing their .NET version of Java implementation and Java for Google Android, but I just can't grasp the whole concept as a totality.
|
Given the following set of classes:
Camera, Photo, Photoshoot, Subject.
How would they interact to model the following sentence?
The next subject is called and has their photo taken.
I want to see if there is a preferred solution.
Edit:
Sorry I should have said in C#.
|
What is the best value to use for id in an ActiveRecord pattern (PHP).
auto-increment is out of the question. I would like to generate an id value that I can use to create a new record, but will be unique.
random values have a chance of creating collision.
querying to get the last id used, and then incrementing that va... |
I just got hired for my first programming job! I am 25 and have been using Java academically for 6 years.
Now that I have been hired I am nervous that my skills will not be what the employer expects. I am afraid I will be assigned to a project and have to ask lots of questions that my coworkers will feel are amateur.
I... |
How can one a software developer learn about how to provide business solution? including but not limited to, implement business applications in decent software architectural style?
CRM, ERP, MDM, SOA etc... are they really strictly reserved for enterprise?
Where to learn about their...
common features
software / data... |
Given that Ruby has good list operation capabilities in-built - reduce, map, select, collect etc. It has Procs, Blocks and Lambdas, and has nice iteration support (the each family), would it be a bad design decision if I attempt to write all my Ruby stuff in the most pure-functional way possible? Escpecially for code ... |
Possible Duplicate:
How to tackle a boss who thinks everybody in this world is wrong except him?
I've been an MMORPG programmer for two years. I have some experiences on limited platforms like cell phones, so I've got a strong awareness of memory optimization. But the programs of my current company eat a lot of mem... |
I'm trying to understand the difference between non-functional requirements and quality attributes. Are they the same thing?
You can find a set of quality attributes in the ISO 9126, now ISO/IEC 2500xx SQuaRE family of standards.
I know that each system is defined by a set of functional requirements and every of this r... |
Firstly, a disclaimer. This question is not because I'm a disgruntled employee planning to hide some malicious code which I can later blackmail my employer with. I actually quite like the people I work with - just simply curious.
So if an old employer needed a password for some resource that only I had. Would I be obli... |
Since the Legal site of Stack Exchange isn't ready quite yet, I figured this would be the best place to ask this question.
What are, if any, the legal requirements (or online resources for finding this info out) that I must uphold if I wish to sell an application that acts as a Personal Account/Information Manager, whi... |
In my team, we don't do formal code reviews. We tend to think that it's enough with pair programming and rotating pairs often.
Should we consider doing formal code reviews?
What would be the advantages?
|
I am planning to buy a GPS enabled android phone and develop an Augmented Reality application (which will point the locations in front of camera).
All i found about GPS is that it just tells the location of the device, how do i get the direction where camera is pointing, and height of device? how to make compass (2D, 3... |
I'm being asked by the company I work for to extend my notice period. I'm not outright against it (in fact it's somewhat flattering in a way) but it has made me wonder what a typical notice period might be for a C# software developer?
|
I've had a couple of discussions with a co-worker about the use of single letter variable names in certain circumstances inside our codebase, at which we both disagree.
He favours more verbose naming convention for these, and I do not.
There are three scenarios in my opinion where I use single letter variable names:
L... |
I know websites are hacked because of loose ends but how are they hacked via a form? Is it because the website owners didn't validate the form and the way they structured?
|
After releasing a new free open source application, I would like to present it to as many people as possible.
What are web sites (directories) which one should use to present free open source applications?
Looking for a list of sites like Freshmeat, Sourceforge, ...
|
Some people have the view of programming that it is just repetitive typing on a keyboard. None of this is true. First of all, there is so much more you have to do than actually typing down the code, such as design architecture and so on. Secondly, it could be a greatly varying, non-repetitive task, with new challenges ... |
My box is configured:
Ubuntu, Code::Blocks IDE, GNU gcc compiler.
I'm not very experienced in C. I am having some difficulty seperating what functions are available to me. Evidently there's a few different compiler versions and they have different libraries available.
Is there an official GNU gcc compiler reference ... |
I am part of an organization that is formalizing their software development processes/capabilities/etc. While the organization is not traditionally a software organization, they want to do this right and provide the developers who work in the organization (which includes me) a solid set of tools in which to work from.
... |
We have an existing code base which has been developed to meet the needs of most of our clients, which has accumulated features and bug fixes as they were needed and as projects developed universally useful features.
Right now, we're running into the problem that there's no real documentation for its capabilities outs... |
I often find myself embracing "now is better than never" when I'm advancing the DRYness of a design. Typically, I find that I need to cultivate an understanding of the One Authoritative Location for a piece of knowledge in the context of a system of other pieces of knowledge. Thus, I tend to design the system 'now.'
... |
I have a project in Python where I have a server. The server can have a variety of different services, but I don't know what those are until I start it up. I want it to do a search of available plugin files to know what services are available.
Right now, I'm doing that by just having the metadata files as Python source... |
The "canonical" idea is pervasive in software; patterns like Canonical Model, Canonical Schema, Canonical Data Model and so on, seem to come up again and again in development.
Like many developers, I've often followed, uncritically, the conventional wisdom that you need a canonical model, otherwise you'll face a combin... |
There are many security risks coming from having close contact to the hardware as opposed to using well-tested and proved APIs from high level programming languages. It is much easier to cause a buffer overflow in C than in a language such as Java.
What are the risks or vulnerabilities (e.g. buffer overflows) that ever... |
Where do we draw the line between delegation and encapsulation of business logic? It seems to me that the more we delegate, the more anemic we become. However, delegation also promotes reuse and the DRY principal. So what is appropriate to delegate and what should remain in our domain models?
Take the following concern... |
I've been using YADIF (yet another dependency injection framework) in a PHP/Zend app I'm working on to handle dependencies. This has achieved some notable benefits in terms of testing and decoupling classes.
However,one thing that strikes me is that despite the sleight of hand performed when using this technique, the ... |
We have developed several apps and published them on Android Market. We are now writing an app that another company will brand and sell through their own publisher account. The other company has no experience with Android Market or with Android development. I'd appreciate any insights from others who have faced similar... |
I heard recently an instructor mentinon that developing games was the best way to learn programming. Besides the fact that everything had to be created in code, he said you really get to fully experience and implement OOP into your programs. In other words everything you make in a game is a literal object both technica... |
Malware uses interesting techniques for hiding themselves from anti-malware software and more. They can "polymorph" themselves: practically change the code while it continuing to mean pretty much the same to the executing machine, making antivirus definitions invalid etc.
I wonder if there is anything (non-malicious) d... |
I have a webstore which sells components (it is a academic project) which looks like this. I have developed the same web application using following database methodologies:
MS Sql Server with Stored procedures and sql data reader
LINQ to Sql
DB4o using LINQ (Client/Server)
What features can I compare apart from the t... |
I graduated from college in Computer Science a year ago, and am now working at a small web development company (me and one other developer, plus managers, customer service and tester). Until just before I started, there was no source control system. We're now slowly starting to implement SVN, but the other (senior) d... |
I'm billed as the "Windows Expert" in my very small company, which consists of myself, a mechanical engineer working in a sales and training role, and the company's president, working in a design, development, and support role.
My role is equally as general, but primarily I design and implement whatever programming on ... |
I just finished reading the Ruby chapter of the book 7 Languages in 7 Weeks. Aside from some syntactic sugar here and there I can't really see anything which can't be done with C# with a similar syntax. I do understand both languages are inherently different, but my question relates to its usage rather than design.
Rel... |
I am heading into my senior year in computer engineering and have gotten a internship for this summer and fall. Since I will not be doing homework I would love to take this opportunity to get involved with an open source project of some sort. I am proficient with C, C++, Java, and Python. I am also reasonably familiar ... |
As the question says on the tin: Can I integrate software under Creative Common for commercial gain? I want to use Creative Common software (e.g., http://thrivingkings.com/apprise/) for some big clients.
|
What suggestions would you give to find networking opportunities or to network at user groups and other developer venues?
For instance, if you went to a code camp, would you try to network with other developers there? How would you go about doing it? Would you go up to someone you don't know at lunch and introduce yo... |
I've been in several projects using scrum now.
The length of the sprint review and/or retrospective has varied from client to client, from project to project.
Some of the reviews became too long (2 days).
Sometimes, I've lost focus while being in this long meetings and just wanted to go back to my safe and happy place ... |
Does anybody know the status of this C++ Inversion of Control Container?
Any alternative?
|
I am considering using the Delegate Pattern to get some data necessary for an operation. There are a few different pieces of data that the algorithm needs to run, but they all have default values that can be used if they aren't explicitly set.
If I were to use the delegate pattern, I would define an interface that defi... |
[Edit: Thanks S.Lott for the hints]
I'm developing a web service from scratch. The service could have potential of 10,000 requests a day. Actually, to be honest, requirements aren't that clear at this point of the project. What the management team wants is to build something and getting it working. However, it does hav... |
Here's my scenario with made-up names: A big company called Supersoft have announced that in about 3 months they're going to release an Android app called "Supersoft Metronome" (where Metronome is a fairly common noun). I want to call my new iPhone app (notice the other app is on Android) "Metronome" and I'm ready to r... |
I am currently working as a Web Application developer using .NET Technologies. I am interested in learning more about the technologies that I work with, but I am ALSO interested in a million other things... (including Systems programming, Networking, Game Development, Mobile Development, Computer Science topics, Math, ... |
When a project has reached end of life and is being retired, either because the technology is obsolete, a newer version of the program has been rewritten, or it no longer solves a problem that is needed to be solved, what should be done with the code? Should it be deleted, or kept for future reference?
This also appli... |
Hey guys I have this great idea for a web application, but I am unsure on how to develop it.
I know I need a team of people to make it, Developers and Designers, but where do I start?
Eventually I know I will need everyone, but for a startup, who are the people you need first, and who can you add on as time goes by.
So... |
I am learning C/C++/Oracle/Unix.
I am thinking of developing some application on my own, but I have no Idea what else is required.
If you take an example of C++. I have very basic knowledge of it (data types, OOP concepts, vectors, file handling, exception handling, etc). I am not an expert though. I have just read one... |
I have developed a small android app. I am planning to release it in Google Android market. What are the things I should be aware of before doing this?
|
The Boost Software Library is licensed under the BOOST License
Now, if you only use C++11, does this mean you're bound by the BOOST license terms if you use those parts of C++?
|
I work in a small IT department in a non tech company. My manager recently quit and they are looking for a replacement. I guess since I'm one of those "rare" developers with people skills, the director is encouraging me to apply
Part of me wants to apply but another part of me says no. The pay and ability to make a d... |
On some companies I've worked for, managers have spent quite a lot of money on it-security consultants. Primarily because they're afraid we're gonna get the source code stolen by a rival company.
However, as a programmer, I see it as a minor concern that a rival company would find the actual source code useful. After ... |
I think it would be a great idea if we had a regular expression search engine, but can it be done? It seems impossible since there's no feasible way of indexing such a huge amount of data properly and displaying results in the order of relevance from what I can think of.
I'm curious what the answer to this one would be... |
When people post code on forums they tend to change or blur out parts of their code. Probably because they want to protect certain parts that might be exploited if it ends up in the wrong hands, I guess?
But is it really necessary to do this?
Here are a couple of things I see a lot:
Renaming id's and class names i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.