instruction
stringlengths
34
19.9k
While trying to answer questions on SO site (particularly C++ questions) I find that most of the times one person or the other includes a quote from the standard. I myself have hardly read the language spec. Even when I try to read it, I can't get my head around the language used in the specs. So, my question to become...
How many of you have ever used (or even know of) the Visual Studio Text Templating Engine? I mean, T4 templates have been around for quite some years now. The where initially included in Visual Studio 2005 SDK, and they where moved to Visual Studio 2008 core just before releasing it. What I want to know is if this is ...
Are there any recommendations for book(s) that are largely agnostic (with examples of MQ implementations is fine) on vendor but go to great details on the architecture, management, nomenclature, atomicity, durability, patterns, and logical deployments on Message Queue systems? Surely there are enough shared concepts be...
I'm in the initial planning phase of a re-write project and I'm deciding between silverlight/silverlight oob/wpf. TL;DR at the end. It's a LOB app that handles leads/customers/appointment calendars. Not too complicated. I'm independently researching these options elsewhere, but I thought I'd ask around. Some rough init...
<body> <!-- wrapper --> <div id="wrapper"> <!-- title --> <div id="title"><img src="title.png" alt="" /></div> <!-- form wrapper --> <div id="form_wrapper"> <!-- form --> <form action="thankyou.php" method="POST"> <!-- ... ... --> </form> <!-- /form --> </div> <!-- /fo...
Somewhat inspired by this question: For what common problems is functional programming not a good fit? - but nevertheless a question which I always wanted, but was too afraid to ask. I've been in ... well, let's call it engineering software development practically all my life, and in all that time, although OO had alwa...
The saying "It's easier to beg forgiveness than ask permission" seems pretty popular among programmers and IIRC was attributed to Grace Hopper. In what situations is this typically true, and why do you believe that such a counterintuitive proposition would hold?
What's next in the web industry, as social media reaches a plateau, what are the next milestones in this "experiment"? I guess I'm looking for in depth opinions on what's next in our beloved industry? What's beyond facebook, wikis, collaboration, shiny buttons, and interactive instantaneous communications? What will d...
I have been disassembling a large software project on my own, as a hobby. It is an educational exercise and I have learned a lot in the process. That said, I feel that my progress would be considerably quicker if I was to collaborate on the project with other like-minded individuals. Herein lies the problem -- maybe. I...
I have been looking at RentACoder, Freelancer and eLance from last few years but I always hesitated to register at these site. Hesitation includes little worry too. These questions fill me: (1) Is there a legal contract between the bidder and the coder? Just in case my delivery date extends, what happens? (2) After del...
I feel that side effects are a natural phenomenon. But it is something like taboo in functional languages. What are the reasons? My question is specific to functional programming style. Not all programming languages/paradigms.
I come from a scientific and embedded programming background, and I have had minimal experience with web programming. What would be the best approach to take to get up to speed with web programming? Tools and framework suggestions? One approach would be to dive into learning a framework, such as Rails. I started doin...
For me I am C# and Java person. I find these 2 languages are quite similar so its easier for me to crossover each other. I'm not sure if its good idea to pick up other different languages. Any thoughts?
What are the risk factors that we need to consider while planning for a software project.
If you've just been introduced to a new project, what's the first thing you look for to get an idea of how it works? Do you look for the design first? If there is a design, what do you look for in it? Class diagrams or deployment diagrams or sequence diagrams or something else? Or do you go straight for the code? If s...
Registering on an insurance company's website right now, and my password is 16 characters long, using a nice variety of letters, numbers, special characters, etc. However, here's their list of restrictions: Note your password: must be between 6 and 12 characters must not contain spaces, special/international characte...
I read this answer and found a comment insisting not to send password by email: passwords should not be able to be retrieved by email, I hate that. It means my password is stored in plain text somewhere. it should be reset only. This raises me the question of handling Forgot Password option? At any cost the raw passw...
I have been developing on Android for a couple months now, and building upon one in house program I found the scalability to be lacking. I have that gut feeling that if I applied some OO Design Patterns I would get an overall better program in speed, scalability, and readability. Do any of you StackExchangers have ways...
It is now more and more popular to have video tutorials of the software or technology instead of writing long articles. As for me, it makes perfect sense, especially for such areas like "Getting Started" or "What's New". What do you think is the most appropriate duration for such a videos? If you record the video tutor...
Am I wrong if I think that Python is all I need to master, in order to solve most of the common programming tasks? EDIT I'm not OK with learning new programming languages if they don't teach me new concepts of programming and problem solving; hence the idea behind mastering a modern, fast evolving, with a rich set of c...
Do other people fix bugs when they see them, or do they wait until there's crashes/data loss/people die before fixing it? Example 1 Customer customer = null; ... customer.Save(); The code is clearly wrong, and there's no way around it - it's calling a method on a null reference. It happens to not crash because Save...
I'm a regular user here, but linking my screen name to my real identity is dirt simple, and the question I'm about to ask would lead to a very unpleasant conversation with my current employer were they to see it. So, my apologies for this sock-puppet account; I promise Socky and I won't be voting on each other's stuff...
This StackOverflow question asks "where can I get Microsoft.Data.Objects" It turns out the answer was probably that its in the CTP4 (code first) release of Entity Framework 4 However there where a lot of guesses. Including System.Data Entity Framework Microsoft.ApplicationBlocks.Data Microsoft.Practices.EnterpriseL...
Python seems all the rage these days, and not undeservingly - for it is truly a language with which one almost enjoys being given a new problem to solve. But, as a wise man once said (calling him a wise man only because I've no idea as to who actually said it; not sure whether he was that wise at all), to really know a...
When do you start writing your Exception Handling Code? When do you start writing Logging Statements. For the purpose of elaborating this question, let us assume that we are on .NET platform with log4net logging but feel free to answer in a generic way. Solution: A Windows Forms Project. Projects: UI, BusinessRules,...
Often when I write a functions I want to make sure the inputs to it are valid in order to detect such errors as early as possible (I believe these are called preconditions). When a precondition fails, I've always thrown an exception. But I'm beginning to doubt whether this is the best practice and if not assertions wou...
How often do you or have you seen meta-programming be used in projects? In uni I've never seen this be applied, but I've seen this on my previous job (when I saw it I was blown away of how effective it was). But how common is it? Is it used all the time, or just occasionally?
I have a fully configured mantis bug tracker for tracking issues in apps that I create. When an user is disciplined and goes straight to mantis to write a issue report, he/she will have fastest response and everything regarding the issue will be very easy to track. However, not everyone is keen to do so. They report ...
I'm kind of horrified that people actually suggest using UTF-8 inside a std::string and are OK with UTF-16 std::wstring. Do you actually do this? Do you think that it is OK?
My company is getting PC refreshes with a choice of to have a desktop or laptop. Each one seems to have its pros and cons. Would you want the flexibility and freedom of the laptop but take the risk of working extra hours at home? Or a desktop limited to one place, but not having to worry about taking work home and dis...
I know it is expensive but (IMO) I believe it is a very good practice. I'm talking about rules like say, you can't save an Invoice if you are not a sales person... so in that case throwing an exception saying 'your are not authorized' or such... Another approach it would be having objects with a status or something lik...
In the Java world, we often talk about the JVM, and when Java was new it had the supposedly killer feature of "Write Once, Run Anywhere." From the way people talk and write, this seems different from the way that Python, for example, works. Yet I've not been aware of any way that Python code that I've written would wo...
When it comes to "interview test" questions, the subject of FizzBuzz often comes up. There is also a Coding Horror post about it. Now, if you bother reading sites such as this, you are probably less likely to be in the demographic of programmers who would find FizzBuzz anything but trivial. But is it really true that 9...
How can I maintain proficiency (if not expertise) in multiple languages? In any large organization it seems necessary to know more than one language. For example, this week I've looked at if not written code in the following languages. VBA C C# Java Thankfully they're all imperative languages, or I would have lost m...
So I've had a series of really bad experiences and am wondering what I'm doing wrong. I started out as a part time programmer at a major university. I developed a problem with my wrist and asked (nicely) for some help with my ergonomic accomodations. My boss started screaming at me, then later claimed I screamed at he...
What should be in a good (read:useful) coding standard? Things the code should have. Things the code shouldn't have. Should the coding standard include definitions of things the language, compiler, or code formatter enforces? What about metrics like cyclomatic complexity, lines per file, etc?
Now that we know what is in store for c#5, there is apparently still an opening for us to influence the choice of the two new keywords for 'Asynchrony' that were announced by Anders Heijsberg yesterday at PDC10. async void ArchiveDocuments(List<Url> urls) { Task archive = null; for(int i = 0; i < urls.Count; ++...
What's so unique about it? Heard great things about it, used it, found that beside the Google Apps Integration there's nothing really special about it. Maybe I just don't get it? So, what's your reason to use basecamp?
What tools are necessary when developing efficiently with Silverlight 4? VS 2010 is a gimme, but what version? Is Pro enough? Premium? What about Expression Blend/Web/Both? When considering VS 2010, premium comes with an MSDN subscription but it's at the high end of the budget. It makes sense if Expression comes with ...
For those of you who work in big-design-up-front/waterfall groups: how much critical thinking and design is skipped in your design phase and left to your implementation phase? How complete and detailed are your functional and technical specifications delivered at the end of the design phase? It seems to me that there's...
The general rule is to keep check-ins small and check-in often. But sometimes the task requires large changes to the underlying framework. Then checking in before compeleting the task will break the project until you check in the finished work. So what strategies do people use to reduce the risk of losing work, or deci...
A lot of people in the coding community talk about continuous improvement, deliberate practice and so-on - but when they talk about their current practices it's almost like they 'sprang fully formed from the loins of Zeus' because you don't hear about how their opinions changed over time or what they learnt recently. E...
From my experience in the current working environment, one's professional development is definitely in the hands of the individual. As I see it there are several routes to the same objective based on cost, time and availability External Offsite training Online Training providers (itunes U,Pluralsight etc) Books Sp...
I personally use CodeRush in Visual Studio 2010 to do refactoring, write code faster with templates and generally navigate my code 10 times faster than stock VS. Recently, I've been working on another Android app and got to thinking...What are the top productivity plugins for Eclipse? Preferably free. I'm looking for ...
For applications targeting multiple platforms, I see mainly two development approaches- Go for some JAVA-like development platform. Have one code solution and let the intermediate runtime handle different platforms. If something goes wrong in any platform, tweak the code a bit. But keep it same for all. Make modular c...
I wrote a .NET Windows application using framework 3.5. At that time, 3.5 was very new and I had knowledge of framework 2.0 only. Due to deadline, I didn't use any new features of version 3.5 and delivered the application. There was no time. It is now two years and the app. is running fine, but my clients have requeste...
I have a difficult time trying to learn how to program from straight text-books. Video training seems to work well for me in my past experiences with PHP. I am trying my hardest to stay focussed and push through. Specifically I am looking to start indie game development. Over the last two weeks I have been trying to pi...
What is the best way to choose colors for LoB app, i need to style TreeView, dropdown's, textboxes and a pivot grid, so i need a bunch of colors, tried Kuler but it gives only 6 colors. So the question is how to do it without designer? PS. It's a silverlight app.
Often when I hear about the switch statement, its put off as a way to replace long if...else chains. But it seems that when I use the switch statement I'm writing more code that I would be just writing if...else. You also have other issues like keeping all variables for all calls in the same scope. Here's some code tha...
For 4 years now, I've been the solo developer for a small company. We have a handful of well establish products in a niche industry. We will be hiring 1-2 developers soon, and that will likely change the way things operate around here. While I won't have a "real" title, I will be "in charge" of this team. What I want t...
End-User Programming is where regular end users, i.e. non-programmers, are able to customize a program, or create a new one, with minimal training or instruction. App Inventor for Android is one recent example, but perhaps the most popular example of end-user programming is the spreadsheet. What examples of end-user pr...
I am thinking about creating a silverlight application, and I lack the skills to create a good looking UI. Today's graphic designers usually know HTML and CSS and thus save me the trouble of doing something I am not very good with. Is this the same case with XAML? Do I have to hire two employees for this job?
Are there any systematic differences between software developers (sw engineers, architect, whatever job title) with an electronics or other engineering background, compared to those who entered the profession through computer science? By electronics background, I mean an EE degree, or a self-taught electronics tinke...
Let's say one works in a hypothetical company that has several developers that rarely worked together on projects and the Boss didn't believe that code reviews are worth the time and cost. What are various arguments that could be presented in this scenario that will portray the benefit of code review? Furthermore, wha...
Hi We have a CMS application that lets people create websites under our domain. The system was built a few years ago and it used a method that transfers parameters such as website id, folder code and more using the url. this method created a giant url for every item in the website For example: My domain is www.domai...
Usually when talking about coding standards we refer to the code of the program itself, but what about the unit tests? Are there certain coding standards guidelines that are unique to unit tests? What are they?
Can any one explain about the agile methodology in simple sentences?
Where I work there are a few experienced software developers with a software background, but the majority of developers are physicists or chemists with excellent domain knowledge but limited experience when it comes to developing high quality, maintainable software. To address this we have started running regular talk...
Whenever I do a check-in, I always check in from the root of the project... i.e. check in all the files in my working copy, so after the check-in the source control repo contains exactly the same set of files that I just finished testing in my local copy. I also make sure my source control is set to flag local files t...
There are many software development methodologies - SCRUM, agile, XP, etc. - and they all have there advantages and disadvantages I suppose. But when do we really need to apply them? Surely they are not necessary for small 1-man projects, but for large 50+ teams you can most certainly not go about ad-hoc:ing the whole ...
I found that this was the case with Eclipse. When I first started learning Java a lot of people told me to start with NetBeans because it's easier, comes with a lot of predefined functionality and most of the configuration is done by default. Indeed it seemed like an easy IDE but I just hated the way it looked. The UI...
We are building a web service(SOAP, .Net) which would be talking to (mostly) native clients (windows, C++) and we are wondering what is the best way to communicate errors to the client (e.g. SomethingBadHappened like login service not available or something like user not found) and haven't been able to decide between t...
I recently tried to implement a ranking algorithm, AllegSkill, to Python 3. Here's what the maths looks like: No, really. This is then what I wrote: t = (µw-µl)/c # those are used in e = ε/c # multiple places. σw_new = (σw**2 * (1 - (σw**2)/(c**2)*Wwin(t, e)) + γ**2)**.5 I actually thought it is unfortunate...
What is the difference between update and upgrade in the context of application software?
When I started using an object-oriented language (Java), I pretty much just went "Cool" and started coding. I've never really thought about it until only recently after having read lots of questions about OOP. The general impression I get is that people struggle with it. Since I haven't thought of it as hard, and I wou...
Often in C code (and some other languages as well) I have seen a section in the top-level comments for mod lines. These include the date a modification to the file was made, the user who made the modification, and a brief description of what was changed. I have not yet seen an equivalent of this in Java. I think this i...
I'd like to know what people think of ASP.NET Dynamic Data. I see the project type in visual studio and have found very little about it mention on blogs and in books. I created a site using it and it is great the way it wires up the CRUD pages, but i don't understand how to modify the the pages without modifying the...
Is there a generally agreed upon definition for what a programming abstraction is, as used by programmers? [Note, programming abstraction is not to be confused with dictionary definitions for the word "abstraction."] Is there an unambiguous, or even mathematical definition? What are some clear examples of abstractions?...
I have coded like this many times, and I've never encountered an issue, but the compiler always warns when it expects a return and there is none. For instance, look at this: -(NSString *)outputStringForInteger:(NSInteger)int { if (int == 0) { return @"Number is Zero"; } else { return...
I am a CS undergrad but I landed a programming job last year and I like it a lot. We are currently 3 programmer in the development section of the company and we have to work with pretty much anything were asked to do. We deal with many different languages and learn them as needed for some quick jobs etc etc. We want t...
Would a recruiter prefer a B.A in Comp Science from a more prestigious university or a B.S in Inf Tech from just an average university? Would it matter for someone already established in the field with plenty of experience? The only difference in the B.A and B.S is essentially the mathematics. The B.S is geared for th...
One thing working in Haskell and F# has taught me is that someone in a university smarter than me has probably already found an abstraction for what I'm doing. Likewise in C# and object-oriented programming, there's probably a library for "it", whatever it is that I'm doing. There's such an emphasis on reusing abstrac...
Just a random observation, it seems that on StackOverflow.com, there are questions about if "++i == i++". That question gets asked all the time though, I think I saw it asked about 6 or 7 times in the past 2 months. I just wonder why C developers are so interested in it? The same concept/question exists for C# and Java...
After writing a few (relatively obscure) OSS frameworks, I've learned the hard way that writing a good framework isn't enough--there has to be some time spent marketing your framework as much as the time you spend coding it. So here's my question: What are some effective ways for making your OSS project become well-kno...
There seems to be a conflict over whether its better to use whitespace or tokens like brackets to indicate scope. I've seen many praise python's solution to the inconsistent indentation problem, but many disagree: Any language that has whitespace as tokens needs to die. posted later on the same answer: I was sortof ...
We're outsourcing some work to an external developer, so I'm busy writing up a contract about what constitutes a deliverable. So far I require that the code is shipped with automated tests. But, what is a reasonable way to specify the detail of tests up-front in the contract in a measurable way? I'm loathe to say "100...
EDIT: This question at first seems to be bashing Java, and I guess at this point it is a bit. However, the bigger point I am trying to make is why any one single language is chosen as the one end all be all solution to all problems. Java happens to be the one that's used so that's the one I had to beat on here, but I'm...
Do you think Object Oriented Programming is a solution to complexity. Why? This topic may be a bit controversial but my intentions to know the answer of Why from the experts here !
What is that feature according to you that has made object oriented programming so much successful ? Message Passing Inheritance Polymorphism Encapsulation Or some other feature that you may like to introduce. Also I would like to know that what is the connection between Abstract Data type and Object Oriented program...
I often struggle to see the advantages of pointers (except for low level programming). Why use of char* instead of a String or char[] or what advantages pointer arithmetic brings. So what are the pros and use cases of pointers?
Anyone who has used R# or CodeRush knows how fast you can put together simple constructs (and refactor complex ones) with a simple keyboard shortcut. However, do these productivity plugins cause a false evaluation of ability during interviews? Part of being a productive code writer (and making a good first impression ...
Why did Microsoft not provide generic implementation of OrderedDictionary? There are a few custom implementations I've seen, including: http://www.codeproject.com/KB/recipes/GenericOrderedDictionary.aspx But why did Microsoft not include it in the base .net library? Surely they had a reason for not building a generic.....
I'm learning about the open source web based project management tool Trac and I'm a bit confused about its role in the area of reporting defects vs bug tracking. For those unfamiliar with Trac itself, it has a Ticket system which is the tool used to report issues, and you can choose between reporting a task, an enhanc...
I have always wondered about this and perhaps experienced folks here can comment on this. I always read that big established software companies such as Google, Microsoft, etc are always wary of hiring software engineers/(or other related professionals) who don't exactly meet the job requirements, and would rather turn ...
I always start the day thinking "I'll easily get this done by the end of the day" and set what looks like a realistic target. So why do I never hit it? The task always ends up taking 3x longer due to unforeseen bugs, last minute changes etc. Is it just me? I don't seem to be getting any better predicting what can be d...
After reading this post about ideal programming language learning sequence, I am wondering what would have been the answers if the question was performance -instead of learning- oriented ? Since there are many programming languages I chose to ask the question for OOL to be the least subjective. But any thought or compa...
I suck at estimates. When someone asks me how long something will take, I don't even dare to make a guess since I will be completely off the mark. Usually I'm way too optimistic, and should probably multiply my guess with some large X factor... How can I learn to make better estimates? It's not taught at my uni, and ev...
Planning is very difficult. We are not naturally good at estimating our own future, and many cognitive biases exacerbate the problem. Group planning is even harder. Incomplete information, inconsistent views of a situation, and communication problems compound the difficulty. Agile methods provide one framework for orga...
Apart from the obvious questions relating to specific project work someone is working on are there any questions I should be asking a fellow dev who is leaving the company? So far I am thinking about; Locations of things on the server he uses that not maybe everyone does. Credentials he has set up that we wouldn't hav...
Many tend to write "C/C++", as if they were the same thing. Although they share many similarities, they are clearly not the same. But what are really the fundamental differences between C and C++? Is C++ an enhanced version of C, or are there features in C which do not exist in C++?
You know the prospective company fairly well but are asked "Do you have any questions for us?". To show interest, what are some of your favorite questions to reply?
Where I work, employees use a third-party desktop program for their clients. This program saves data to a flat file. My colleague wants to write a Java program that uploads that flat file to a remote server, opens the desktop program when the flat file is downloaded from a Web site, and checks if the desktop program is...
I generally use switch statements to simplify a block of multiple if statements - for example - returning a feedback string to a user based on a multiple choice input. I also tend to construct classes so that there is one "management" method, to avoid sequential steps or chained method invocation within other methods ...
Which is better/more generally accepted? This: if(condition) { statement; } Or: if(condition) statement; I tend to prefer the first one, because I think it makes it easier to tell what actually belongs in the if block, it saves others from adding the braces later (or creating a bug by forgetting to), and it makes...
What build or deployment tools are available for a 1 person development effort, in the .NET space, that are capable of producing project outputs? I'm not looking necessarily looking for a CI server (though I can't think of anything else that does what I'm looking for) but I am looking for it to: produce and publish do...
It seems like every .net book talks about value types vs reference types and makes it a point to (often incorrectly) state where each type is stored - the heap or the stack. Usually it's in the first few chapters and presented as some all-important fact. I think it's even covered on certification exams. Why does stac...
I keep reading that it is recommended for a programmer to take frequent breaks while programming, and the usual recommendation I see is 5 minutes every half hour or 10 minutes every hour. I gave it a try, but quite often I find something interesting during those 5 minutes, and it takes me away from what I was working o...
I'm working as a developer in a small software company whose main job is interfacing between separate applications, like between a telephony system and an environment control system, between IP TVs and hospitality systems, etc...And it seems like I am the candidate for a new job title in the company, as the person who ...
There are many ways how to exit program in C. Some of them are returning zero or error code, using exit function with EXIT_SUCCESS, EXIT_FAILURE, exit(0), exit(1) or some other error code, abort and probably few more I can't think of now. My question is which option is the best and why. I'm asking here because every ti...
I am trying to learn more about the various ways that the problem of a Distributed Queue may be solved. So I would like know what products, services, implementations and research papers that are already out there. An implementation will face many challenges and will be forced to make tradeoffs: Does it have strong or ...