instruction stringlengths 34 36.1k |
|---|
The typical reason I hear to why people bash C++ is that they don't actually know C++, they just know "C with classes", which apparently is different. I am just beginning to learn C++, however, I want to actually learn C++ and not simply "C with classes". How can I ensure I learn C++ properly? Some examples would be wo... |
Java allows marking variables (fields / locals / parameters) as final, to prevent re-assigning into them. I find it very useful with fields, as it helps me quickly see whether some attributes - or an entire class - are meant to be immutable.
On the other hand, I find it a lot less useful with locals and parameters, and... |
There is the classic OOP problem of method chaining vs "single-access-point" methods:
main.getA().getB().getC().transmogrify(x, y)
vs
main.getA().transmogrifyMyC(x, y)
The first seems to have the advantage that each class is only responsible for a smaller set of operations, and makes everything a lot more modular - a... |
Any preferences for Asp.Net programmers on how to document their code?
I read XML with Sandcastle is a good way to go. What do you use?
|
How many ASP.NET developers program using OO (e.g. using get, set)?
6 years ago I developed and maintained a .Net 1.1 Intranet application that had no get/set.
So how about today? Worth trying the pure OO route?
Thanks,
TDG
|
It seems to me that everyone uses NUnit without even considering the other options. I think this is because:
Everyone is familiar with it already so they won't have to learn a new API.
It is already set up with their continuous integration server to work with NUnit.
Am I wrong about this?
I decided to use xUnit on on... |
Today I checked in a change on some code which turned out to be not working at all due to something rather stupid yet very crucial.
I feel really bad about it and I hope I finally learn something from it. The stupid thing is, I've done these things before and I always tell myself, next time I won't be so stupid... Then... |
I guess no one would argue for decomposing use cases, that is just wrong. However sometimes it is necessary to specify use cases, which are on lower, more technical level, like for example authetication and authorization, which give the actor value, but are further from his business needs. Cockburn argues for levels wh... |
I know it's a very subjective question , but this is one section of Software Engineering wherein I haven't seen any improvement in terms of how we can do it in a better way. I guess every programmer does documentation with some frustration, but when working I feel it's the most important tool for me. How can the proces... |
I am in the in-house development team of my company, and we develop our company's web sites according to the requirements of the marketing team. Before releasing the site to them for acceptance testing, we were requested to give them a test plan to follow.
However, the development team feels that since the requirements... |
I have a CI server (Hudson) which merrily builds, runs unit tests and deploys to the development environment but I'd now like to get it running the integration tests.
The integration tests will hit a database and that database will be consistently being changed to contain the data relevant to the test in question. This... |
I created a app using Microsoft's WPF. It mostly handles data reading and input as well as associating relations between data within specific parameters.
As a total beginner I made some bad design decision ( not so much decisions as using the first thing I got to work ) but now understanding WPF better I'm getting the ... |
I am trying to design the architecture of a system that I will be implementing in C++, and I was wondering if people could think of a good approach, or critique the approach that I have designed so far.
First of all, the general problem is an image processing pipeline. It contains several stages, and the goal is to des... |
This question has been in the back of my mind since I started with WPF and Silverlight. In general, is it better to use nested grids, or just set the Column/Row Span properties in a single Grid?
Better could be measured in many ways (not limited to these):
Easier to read
Easier to maintain and/or extend
Better perform... |
The senior dev in our shop insists that whenever code is modified, the programmer responsible should add an inline comment stating what he did. These comments usually look like // YYYY-MM-DD <User ID> Added this IF block per bug 1234.
We use TFS for revision control, and it seems to me that comments of this sort are m... |
Some friends of mine came up with an idea for a web application which we (so far) think could be great. I made the analysis and all the early stages of the development process and I'm about to start the coding. I'm talking about something that is barely a mid-level project, so I consider one developer (myself) should b... |
I'd like to have some suggestions about using code repository. I don't need to know how to check out or how to check in or how to create a branch. What I need to know is, how to maintain the repository tree or how to structure it for optimal usage.
For example, for a given project, when to create a branch? Where to cre... |
My colleagues and I are a bunch of scientists (i.e., untrained in programming) hacking code for data processing. Is there a concise and simple reference that documents idioms, conventions, or guidelines for organizing code? For instance:
conventions for using global variables
documenting code that is distributed to ot... |
I need to develop a simple declarative language to drive an application. I have various computational modules, some of them depending on other modules which also need setup. The problem is that I don't know how to manipulate the keywords. I will explain myself with an example
Task optimize
Units meters
System {
// i... |
So I've been working on a small, small side project to learn a bit more about PHP database interactions. I bought a small, cheap database of "Inspirational Stories" and set to work on turning it into a web site that no one will ever remember. :P
I've worked out a number of issues so far and learned a fair bit, however,... |
Good afternoon,
My work environment has some problems. Our IT team is trying to be more agile, but we're not really getting buy-in from the business. They attend our daily stand-ups and sprint reviews, and they help with sprint planning, but then they turn around and do 4 months of requirements gathering for a project ... |
I'm having a hard time finding reviews on Google Analytics for native iOS apps and I was hoping to find some programmers on here that have any experience with it. If so, how well did it work?
Thanks so much for your thoughts!
|
Why I Ask this Question:
I've just starting to learn Ruby (and by extension IronRuby since I work in the Microsoft world). I picked up IronRuby Unleased to teach me the basic syntax of Ruby, and any particulars of IronRuby. However, learning the syntax is not my primary goal (if that was, I would just obtain The Ruby P... |
What is the most appropriate way of writing this comment:
/// <summary>
/// Order - Identifies the ordinal location of this category
/// relative to other listed categories.
/// </summary>
if I'm wanting to wrap "category" in <see> tags? I've considered:
/// <summary>
/// Order - Identifie... |
Since this site is read by a global audience of programmers, I want to know if people generally agree that the vast majority of software innovation - languages, OS, tools, methodologies, books, etc. - still originates from the USA, Canada, and the EU. I can think of a few exceptions, e.g. Nginx webserver from Russia a... |
A lot of blogs and advice on the web seem to suggest that in order to become a great developer, doing just your day job is not enough. For example, you should contribute to open source projects in your spare time, write smartphone apps, etc. In fact a lot of this advice seems to suggest that if you don't love programmi... |
Back story:
My best friend is a self-taught coder for a community art site, written in PHP. Some time ago he mentioned he wanted to make the source code of the site public, to which my response was total horror - surely it was going to be full of security holes waiting to be found, and it was going to lead to hacking a... |
A record can implement protocols. However, each time I think of a new function that I would like the record to implement, I have to add it to an existing protocol or create a new protocol. How do I get around this? Ideally, I'd just like to associate a function to a record without having to define a protocol.
|
I'd like to hear from those who have used Doctrine 2 (or later) and Propel 1.5 (or later). Most comparisons between these two object relational mappers are based on old versions -- Doctrine 1 versus Propel 1.3/1.4, and both ORMs went through significant redesigns in their recent revisions. For example, most of the crit... |
With the whole CLI, CTS, CLS, etc., not only did they release a powerful platform/infrastructure, but they released all the specs that describe it etc. It supports potentially infinite myriad languages, platforms, etc. This seems like an insane amount of work, even for a behemoth like Microsoft - especially since it tu... |
For every programming project, managers with past programming experience try to shine when they recommend some design patterns for your project. I like design patterns when they make sense or if you need a scalable solution. I've used Proxies, Observers and Command patterns in a positive way for example, and do so ever... |
That's just an example case. What I'm trying to point out is, how can you claim something (software/website/or any 'ontouch-able' products) as yours while at the same time you are using some existing technologies behind it? (such as database engine, programming languages, compilers, or even the computer it self!).
If y... |
I don’t think that I’m the only one that thinks that Visual Studio exception window is very poor. Trace information lacking formatting and is hardly readable.
Is there any plugin or external tool that shows exception information better?
|
I've seen that there are several different paradigms in C++ concerning what goes into the header file and what to the cpp file. AFAIK, most people, especially those from a C background, do:
foo.h
class foo {
private:
int mem;
int bar();
public:
foo();
foo(const foo&);
foo& operator=(foo);
... |
I'm largely a self-taught programmer. In fact, I first started programming about half way through biophysics grad school, and even though I think I've done some pretty nice work, I've never worked as part of a 'serious' development team that had more than one or two other developers (and I wouldn't hesitate to call th... |
I asked this question an year ago in StackOverflow and never got a good answer. Since Programmers seems to be a better place to ask it, I'll give it a try...
What is the better way to work with release management? More specifically what would be the best way to release packages?
For example, assuming that you have a re... |
I was showing some of my code to a junior programer, and he asked me why am I registering functions for event handling like this:
button1.Click += new RoutedEventHandler(button1_Click);
and not like this:
button1.Click += button1_Click;
The only thing I could say was: because you just write += and press tab two times... |
I'd like to build and sell/or free a software based on ffmpeg and some other mp3 library lgpl, So I know in U.s.a. there's a patent and royalty problem,
But if I live in Europe I'd like to know if I can create software with mp3 encoder/decoder and mpeg decoder/encoder should I pay royalty? Or can someone (mp3/mpeg cre... |
I am a newbie programmer and I recently started learning about exception handling in Java.
I know what try, catch and finally blocks do, but I really need to understand how to use them well and where to handle something in the call stack...
I have a project right now that involves I/O and all I'm doing is handling the ... |
Recently I wrote an small prototype that uses some relatively new technology. Now I wanted to verify if this prototype is usefull and could be used in real world example. But now I have a problem, how can I do that?
Normally, it would be a good thing to compare the prototype with already existing similar applications ... |
I described to a colleague why a constructor calling a method can be an antipattern.
example (in my rusty C++)
class C {
public :
C(int foo);
void setFoo(int foo);
private:
int foo;
}
C::C(int foo) {
setFoo(foo);
}
void C::setFoo(int foo) {
this->foo = foo
}
I would like to motivate better this f... |
I'm trying to come up with a good name for a data access object that executes non-query SQL statements. I know DML is a valid term, but I wanted to make sure it is the best.
Right now we have OracleNonQuery, but I'm hoping to find something better.
UPDATE: OracleDML or OracleDMLStatement are good suggestions. I'll pr... |
I'm facing an issue here. A customer asked me to copy an exact site, and even though I'm trying to convince him of going for a new design he does not accept it. He loves this design so much (on a side note it's horrible and outdated, but I wouldn't say that to him!)
It's been a couple of weeks since we are discussing t... |
I've accumulated a lot of side projects over the years, which I slowly improve on over time. Whenever I return to one, I take some time reading over text files that include design, recent bugs, next features, etc... that I should be working on - it's not pretty.
I'm looking to switch to something more formal. Ideally, ... |
I have just been put in charge of a code project with maintainability problems. What things can I do to get the project on a stable footing?
I find myself in a place where we are working with a very large multi-tiered .NET system that is missing a lot of the important things such as unit tests, IOC, MEF, too many stat... |
While working on a project for my company, I needed to build functionality that allows users to import/export data to/from our competitor's site. While doing this, I discovered a very serious security exploit that could, in short, perform any script on the competitor's website.
My natural feeling is to report the issue... |
I'm trying to educate my colleagues in the area of design patterns. Some of the original Gang of Four patterns are a little esoteric, so I'm wondering if there is a sub-group of "essential" patterns that all programmers should know. As I look through the list, I think I've probably used -
Abstract Factory
Factory Me... |
I'm a software developer at a technology company. I have been tasked with leading the documentation effort for the product I work on. The goal is to produce documentation internal to developer, and the project spills over into the business side, where it covers requirements documentation.
This project is challenging. ... |
You are joining the development team of an existing Android app and are handed a technical document about it.
What information would you like it to have?
|
I read Pro ASP .NET MVC 2 Framework to try and learn the ASP .NET MVC Framework, but I'm really struggling with Ajax in MVC even after going over that chapter again and again. I seem to have a decent grasp on MVC 2 without Ajax. I used the Ajax controls from ASP .NET (non-MVC) and am used to user controls in update p... |
Forgive my newbishness but I have a question to ask about teamwork...mainly because I stink at it. Most of my projects up until this point have been solo so I have a very limited experience with teamwork. I did make graphics for a game that was being developed by several people, but that was completely different than p... |
I'm looking to version control everything, including sql server components, a client launcher, and server-side software.
I want to use an online resource where people can make updates, and make it easier to roll out any changes to players.
Most of the files are just text files, or gtx image files.
I don't think this ... |
I'm trying to make a new functional language and it's interpreter for practice.
As I know most basic building block is only a lambda function, and it's just a closure.
I'm not understanding them well, so I want to ask about I'm right or what's wrong?
|
I'm looking for considerations of the questions "Can code be beautiful?" and "What makes code beautiful?"
Examples would include:
This academic paper: Obfuscation, Weird Languages, and Code Aesthetics
This blog post: Hamon or the Skin Deep Beauty of Code
Please note that I'm not trying to start a discussion here, or... |
My previous question has to do with how to advance code reviews among the developers. Here I am interested in how a code review session should be carried out, so that both the reviewer and reviewed are feeling comfortable with it.
I have done some code reviews before and the experience has been very unpleasant. My pre... |
I am a student who just ended my high school last year. I will be entering college any time between march to August. And.. I am thinking of studying Information technology/System as my course in college.
The problem is, I am unsure if this is the right path for me. I don't know if this is what I really want for my fut... |
My team built a website for a client several years ago. The site taffic has been growing very quickly and our client has been asking us to grow our team to fill their maintenance and feature request needs.
We started with a small number of developers, and our team has grown - now we're in the double digits.
What mana... |
Are you aware of, or have you devised, any practical, simple-to-learn "in-head" algorithms that let humans generate (somewhat "true") random numbers? By "in-head" I mean.. preferably without any external tools or devices. Also, a high output (many random numbers per minute) is desirable.
Asked this on SO but it didn't ... |
I want to start a side project at the company i work for. Right now we are a 100% web based company. I have an idea for a fun project that would install an application on your computer. Anyways, i am not here to discuss the product. I am here to ask about the front end application development. I am a good C++ programme... |
I have an iterative algorithm and I want to print the progress. However, I may also want it not to print any information, or to print it in a different way, or do other logic. In an object oriented language, I would perform the following solutions:
Solution 1: virtual method
have the algorithm class MyAlgoClass which i... |
There are tons of resources on the web referring to and listing code smells. However, I've never seen information on architectural smells. Is this defined somewhere, and is there a list available? Has any formal research been done into architecture defects, and their impact on project speed, defects, and the like?
E... |
When refering to a users stuff should you use My or Your, for example:
My Cart | My Account | My Wishlist
Or
Your Cart | Your Account | Your Wishlist
I found this article that argues for the use of your. It says flikr does this. It also says MySpace and MyYahoo are wrong.
I also noticed today that Amazon uses the ... |
We are currently writing functional and technical specifications in a two column format; summary sentence and technical detail. The details often refer to an appendix with diagrams, layout designs ect.
However I am struggling with what tense to write it in:
With past tense as if the work is done I struggle to show hig... |
I hope that I am asking the right question at right place. If not, please do not hesitate to point me to the right place. I am working in a laboratory, where computers/programming/programmers are all used only as support. But I believe that we need better information organization and management. Given the diverse in... |
Once in a while I have read here and there the size of a project expressed in a matter of days-person or person-day.
I may understand what this means, but I don't know on what do people base themselves to calculate it.
What are the variables considered into this calculation?
How these variables are used in the calcul... |
If I create a login for an app that has middle to low security risk (in other words, its not a banking app or anything), is it acceptable for me to verify a password entered by the user by just saying something like:
if(enteredPassword == verifiedPassword)
SendToRestrictedArea();
else
DisplayPasswordUnknownMe... |
I'm wondering why some people release software as freeware, yet they don't release the source code. Why is that? I can think of some reasons, yet most of them don't make very much sense. Why would you want to keep the source closed but let the program be freely available (free of charge, not free as in freedom)?
|
As I have debugged problems in com, side by side, dealt with dll hell, all while hating the windows registry with passion, I was wondering why is it needed.
I never felt compelled to read an entire book on registry best practices, and then just "get it".
I have, however, used Linux and Mac OS, and look at the ways one ... |
Why doesn't Visual Basic.NET have the addressof operator like C#? In C#, one can
int i = 123;
int* addr = &i;
But VB has no equivalent counter part. It seems like it should be important.
UPDATE Since there's some interest, Im copying my response to Strilanc below.
The case I ran into didnt necessitate
pointers by ... |
In a previous question of mine on Stack Overflow, FredOverflow mentioned in the comments:
Note that patterns do not magically improve the quality of your code.
and
Any measure of quality you can imagine. Patterns are not a panacea. I once wrote a Tetris game with about 100 classes that incorporated all the patterns... |
I've heard this tossed around few times, but never really a source. The wiki page says it was designed for home appliances, but never really references a toaster. Anyone have a source?
|
I think I'm struggled in some situation!
We are a new start-up with 5 employees (2 Programmers). I'm the Technical Manager and that was so fine!
Now I can see the fingers point to me to take the control of everything, as I've the big vision of what our organization do and play the role of CEO or General Manager!
I wan... |
In his article on Virtual Environments (a part of his VFSM specification method) Ferdinand Wagner describes some new ways of thinking about Boolean Algebra as a software design tool. On page 4 of this PDF article, when describing operators in his system he says this:
Control statements need Boolean
values. Hence, t... |
As a developer, i know how much I like learning new stuff. Now that I'm hiring developers for my startup, I know I can't compete with Google's zillion-dollar bonuses and fancy cafeterias, but we are rich with opportunities for curious people to learn. I want to set things up to support that.
So if you're a developer li... |
Today, one can find a framework for just about any language, to suit just about any project. Most modern frameworks are fairly robust (generally speaking), with hour upon hour of testing, peer reviewed code, and great extensibility.
However, I think there is a downside to ANY framework in that programmers, as a commun... |
I've always wondered why some companies want you to register when you install their programs. Personally, I just find it annoying and decline, but what do companies have to gain by having their users get registred? They claim that you get "the latest updates" and stuff, but often you get that anyway without having to r... |
Before I became a consultant all I cared about was becoming a highly skilled programmer. Now I believe that what my clients need is not a great hacker, coder, architect... or whatever. I am more and more convinced every day that there is something of greater value.
Everywhere I go I discover practices where I used to r... |
W3Schools has a reputation of being incomplete, sometimes incorrect, and ridden with advertising; still, when looking to look up some things or link to documentation when answering a SO question, it still is the only handy cross-browser resource.
There are other resources like the Mozilla Developer Network that is doin... |
Which hashing algorithm is best for uniqueness and speed? Example (good) uses include hash dictionaries.
I know there are things like SHA-256 and such, but these algorithms are designed to be secure, which usually means they are slower than algorithms that are less unique. I want a hash algorithm designed to be fast, ... |
Since I'm working on a server with absolutely no non-persisted state for users, every User-related object we have is rolled out on every request.
Consequently I often find myself doing lazy initialization of properties of objects that may go unused.
protected EventDispatcher dispatcher = new EventDispatcher();
Becomes.... |
I am writing a set of junit test classes in Java.
There are several constants, for example strings that I will need in different test classes.
I am thinking about an interface that defines them and every test class would implement it.
The benefits I see there are:
easy access to constants: MY_CONSTANT instead of That... |
I wonder why programming jobs haven't yet "dried up" because of the software evolution. For example, I am a developer myself, which means that I do care about software (I mean I am not of the type of guys that needs a computer mainly to just browse the Internet), and still I wouldn't mind if I never receive any more up... |
I'm not sure I have either my new repo or clone repo workflow, or both, setup correctly. When I create a new project I create a repo on github, can't clone from it as it's empty so I create a new project which goes into my workspace and then the git init runs on the workspace copy. So I end up with everything in worksp... |
My team recently went through the process of laying out a nearly one year plan for our work. We separated the plan into three phases. Each phase will include a couple of launches.
I wonder, from an agile point of you, is this wrong? I think it's not a bad idea, because we haven't spent too much time on designing anythi... |
In Python and JavaScript, semi-colons are optional.
In PHP, quotes around array-keys are optional ($_GET[key] vs $_GET['key']), although if you omit them it will first look for a constant by that name. It also allows 2 different styles for blocks (colon, or brace delimited).
I'm creating a programming language now, and... |
How can the lack of Unicode support in PHP affect a PHP web app?
|
I'm a complete newbie to using online payment systems for web projects, and can't really think of where to start. Let's assume that web system in question needs to generate some income online, and the business idea/functionality is in place, while organizing cash flow is the only unsolved problem.
Points of interest ar... |
I'm wondering why it isn't called Microsoft Communication Foundation. Does it rely on Windows and will it rely on Windows in the foreseeable future?
|
What is the best way to build an open source database?
I would like to build a database of all vehicles and their related maintenance information (i.e Oil Weight, Quantity, Tire Pressure, Windshield wipers etc). Currently this information is fragmented or just not put on-line in an easily accessible manner. As soon
as... |
This question is a follow up to my previous question, which was a bit general, so
I shall be more specific with this one.
I want to automate acceptance testing on a web application. Briefly, this application allows the user to create contracts for subscribers with two constraints:
You cannot create more than one cont... |
We have a new project from a client who is Spanish and has all his Java code and comments, variables, method names in Spanish.
We are not permitted to convert it into English and then use them. If any of you have worked in such a condition, can you advice what can be done to mitigate this risk as we have to do new deve... |
I'm developing a templating language, and now I'm trying to decide on what I should do with quotes. I'm thinking about having 3 different types of quotes which are all handled differently:
backtick ` double quote " single quote '
expand variables ? yes n... |
I am going to start a little side project very soon, but this time i want to do not just the little UML domain model and case diagrams i often do before programming, i thought about making a full functional specification. Is there anybody that has experience writing functional specifications that could recommend me wha... |
In simple steps how can one make the transition from a Use Case diagram to a Class diagram?
|
I'm currently using C and some FORTRAN to solve numerically systems of differential equations.
I'm a bit fed up with both of these languages but I need to have some (rather) efficient code... I'm thinking of switching to OCaml.
Is it worth it?
|
I just need it to support signing and signature verification. I need it to have public and private keys that fit each in 16 bytes. The signature itself must fit 16 bytes.
I don't really care about cryptographic strength, as this is part of something bigger.
Is there such a thing?
|
I've set up a small Google Code project. I feel a bit obligated to use the built-in wiki feature, but I'm unsure of what to use it for.
The project is basically a C++ library for container classes. I'm currently the only member of my project, but I might get a few friends involved.
So, what should I use the wiki for?... |
I am interested in finding out why programmers leave their jobs and if the reasons for leaving have resurfaced in your now job?
Is the reason for leaving simply down to remuneration, location, I hate my boss / coworker, lack of recognition or retirement / new career path.
Update: I am responsible for a team of programm... |
I have first experience of parallel programming of code which actively works with relational database. I find it interesting to combine .NET parallel programming primitives with database locks/transactions and I'm interested in articles on this topic. Could you please advice some (.NET is optional)?
|
I would like to discuss why is PHP called a structural language? what are the OO concepts that cannot be implemented using PHP?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.