instruction stringlengths 34 19.9k |
|---|
When doing TDD and writing a unit test, how does one resist the urge to "cheat" when writing the first iteration of "implementation" code that you're testing?
For example:
Let's I need to calculate the Factorial of a number. I start with a unit test (using MSTest) something like:
[TestClass]
public class CalculateFact... |
I just saw this lecture by Spolsky, where he questions the need for choices and confirmation dialogs. At some point he has a MacOS settings window and he mentions that "now some are getting rid of the OK button". The window indeed has no OK (or cancel) button. Changing a setting makes it change, when you're done config... |
As part of a research I'm working on, I'm looking for public APIs that only work correctly when you apply a certain sequence of actions on them.
For example, the java.nio.channels.SocketChannel class, from the Java standard library, only works correctly with sequences such as open() -> connect() -> read() -> read() -> ... |
Let's say that I have a project that depends on 10 libraries, and within my project's trunk I'm free to use any versions of those libraries. So I start with the most recent versions. Then, each of those libraries gets an update once a month (on average). Now, keeping my trunk completely up to date would require updati... |
First off, thanks for reading the question. I understand that this would theoretically be best asked in the SQA stack area - but - seeing as how that doesn't officially exist yet, maybe this was the most appropriate place for it for now.
I'm looking into tracking down a certification in Software Quality, however, the... |
I think every single time I've used Math.Ceiling or its language variant, I've always had to cast it to an integer. I mean... that's the whole point, isn't it? To get a whole number. So why doesn't it just return an int?
|
Almost all developers who work for a large corporation find themselves on the wrong side of site blocking software. It can be both frustrating ("Just let me read that damn blog!") and helpful ("Woah! Dodged a bullet with that site").
In your opinion, what is the right level of blocking to apply to developers and why?
|
Currently I am working on a code best described as C code living in C++ body. However I haven't been able to convince power that be to re-factor on ground of ease of maintenance.
What in your opinion is the best argument for refactoring the code.
|
One problem that I have faced over the years is that when I stop using a technology (COM,QT)/language (VBScript)/feature (Templates) for development over the time I lose skill in that.
What in your opinion is the "easiest" way to retain familiarity so that when I come back to any of them, effort for relearning is minim... |
I have previously worked on COM, however I have observed for quite sometime that hardly any company asks for COM exp.
Is COM dead or reports of its demise are highly exaggerated?
|
So your client asks you to write some code, so you do. He then changes the specs on you, as expected, and you diligently implement his new features like a good little lad. Except... the new features kind of conflict with the old features, so now your code is a mess. You really want to go back and fix it, but he keeps r... |
Two of the functions our company provides our customers are:
Our Development team of ~10 employees creates software products for businesses in a particular industry. The software is used on hundreds of our customers' computers. Although the product is, for most customers, off-the-shell, larger customers drive its deve... |
Is it ok to put a GPL notice inside a small script or a snippet?
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This pr... |
What is the best way to improve your skills in software architecture? We were taught design patterns in university, and I see plenty of books with simple and straight forward examples, but aside from them, how can you learn good architecture? In other words, how does one evolve into a great architect? What are the prer... |
So that's my story: one of my colleagues uses to review all the code, hosted to revision system. I'm not speaking about adequate review of changes in parts that he belongs to. He watches the code file to file, line to line. Every new file and every modified. I feel just like being spied on!
My guess is that if code was... |
I've read quite a bit about the positive effects of micro finance in developing countries. Organizations exist that solicit capital from donations and then make micro loans to people for the purpose of setting up some kind of business.
The loans are usually quite small, with little to no interest and are well under ten... |
I'm 21 and didn't go to University and hence completely self-taught from tutorials, screencasts, books etc, but when it came to the decision of what languages to specifically learn, I thought, what's going to the most beneficial to learn, ie. for money, exposure, etc... So I did the Sun Certified Java Programmer cours... |
I am new to web programming and at this time I am learning about PHP. I would like to know when do I need to use a PHP framework such as CakePHP? What are things that this and other similar PHP frameworks offer for me? And is it really important to use a framework to be a professional?
And can I create my own framewo... |
I have no knowledge of Entity Framework and NHibernate but definitely want to learn. I want to know how to start. Whether to first read documentation of NHibernate or the default Visual Studio Entity Framework?
Is Microsoft's Entity Framework a variant of NHibernate?
|
How can I move a library inside a project's source tree and compiling static binaries?
I want to use a particular tool that utilizes ANCIENT binaries without upgrading it's API usage. This way I can use the old libraries inside the single binary without wrecking the local host environment. I am on nix with netbeans/ecl... |
I'm currently working on a project, and there are some "code growth" problems, that need a solution for. The deadline is not very far, and it would be advisable to stay within allocated time-frame.
Still, the code needs some restructuring, and here lies the question. Should we try to use a new framework to fix the curr... |
I've heard the argument that you should use the most generic interface available so that you're not tied to a particular implementation of that interface. Does this logic apply to interfaces like java.util.Collection?
I would much rather see something like the following:
List<Foo> getFoos()
or
Set<Foo> getFoos()
inst... |
What would be a good example of the use of TDD in large, real-life, complex, projects? All the examples I've seen so far are toy projects for the purpose of a book or a paper...
Can you name an open-source project that heavily uses TDD? Preferably in C++ but I can read Java and C# or other similar languages.
|
Getters and setters are often criticized as being not proper OO. On the other hand, most OO code I've seen has extensive getters and setters.
When are getters and setters justified? Do you try to avoid using them? Are they overused in general?
If your favorite language has properties (mine does) then such things are al... |
I started learning Java a couple of months ago. I also wanted to become more exposed to linux so I installed ubuntu and started working with Java since then. In the meanwhile however I became more interested in C# and in learning the Windows platform. At this point I'm asking myself if I should stop learning Java and m... |
I believe it is. Why?
I've encountered many Software Engineers who believe they are somehow superior to QA engineers. I think it may help quench this belief if they do the job of a QA engineer for some time, and realize that it is a unique and valuable skill-set of its own.
The better a Software Engineer is at testi... |
Not talking about the recent Java/Oracle debacle here, but something I've been wondering recently.
When I first started programming, Java was the big thing client-side, however these days you hardly ever see a Java applet whereas Flash and Javascript are ubiquitous.
Where did Java go wrong? Did Sun decide to concentrat... |
I have an idea for a program that I think is a good one (Don't we all?). I am an amateur programmer and would like to recruit some more advanced programmers onto the project since there are some aspects that I am not skilled enough to do myself. Is it better to
a) Develop the software on my own as much as I can, eve... |
We had a guest lecturer at our school he went on a tangent regarding those graduating and not being upto the skill level he expects ie. knowledge of one big-time compiled languague like Java, C++ or C#, one scripting language like Python or Ruby, one web framework. What are some other skills that you guys think should ... |
Is is possible to correctly call yourself (or your team) "Agile" if you don't do TDD (Test-Driven Development)?
|
Dr Bjarne Stroustrup in his book D&E says
Several reviewers asked me to compare C++ to other languages. This I have decided against doing. Thereby, I have reaffirmed a long-standing and strongly held view: "Language comparisons are rarely meaningful and even less often fair" . A good comparison of major programming la... |
I frequently encounter a situation where I need to write a program which reads data-objects from a file or system, does a transformation on the data, convert the data to another datamodel and then push the data in another file, or system.
Do you know of a object-model which facilitates these type of programs in such a ... |
The definition of "Free Software" from the Free Software Foundation:
“Free software” is a matter of
liberty, not price. To understand the
concept, you should think of “free” as
in “free speech,” not as in “free
beer.”
Free software is a matter of the
users' freedom to run, copy,
distribute, study, change a... |
I have a client who wants a web app that will let him do the following (as he told me word for word):
User registration
Recurring payments for users
Online conference room reservation
I am supposed to give him a cost estimate very fast and I don't have any time to do any deeper requirements analysis! How would you de... |
I am going to interview within two weeks for an internship that would involve Python programming.
Can anyone suggest what possible areas should I polish? I am looking for commonly asked stuff in interviews for Python openings. Apart from the fact that I have already been doing the language for over a year now, I fail t... |
The stereotypical view of a programmer can't do graphics very well, from what I've read and seen. However, I love programming (preferably OOP, PHP, C++, Objective-C) and can't deny the fact I have a unique taste in web design and others have said I am doing well at it (CSS). I thought to myself "Hey, wait, I'm a progra... |
We're all familiar with the Java package name convention of turning the domain name around. I.e. www.evilcorp.com would, by convention, chose to have their java packages com.evilcorp.stuff.
Increasingly I'm getting fed up with this. As a commercial programmer, I encounter time and again that the software package name i... |
The last week I saw at least three questions where people were confused about the differences between char * and std::string or made some related mistakes.
Don't get me wrong, I don't have a problem with this, I just don't get the exact reason for this. Maybe it was just a coincidence.
|
Back in the "good ol' days," when we would copy shareware onto floppies for friends, we also used a fair bit of assembly. There was a common practice of "micro-optimization," where you would stare and stare at lines of assembly until you figured out a way to express it in one fewer instruction. There was even a saying,... |
I know there have been questions like What is your favorite editor/IDE?, but none of them have answered this question: Why spend the money on IntelliJ when Eclipse is free?
I'm personally a big IntelliJ fan, but I haven't really tried Eclipse. I've used IntelliJ for projects that were Java, JSP, HTML/CSS, Javascript, ... |
What's the best place to put your hobby web projects(the web app itself, not the code) ? Typically, the projects are such that:
a) I just want to test out an interesting idea without exploring the business angle to it, just to see how people take it.
b) I don't expect a lot of traffic
c) I don't want to scale immediate... |
I'm interested to hear what characters people permit in the various common fields of input forms (barring e-mail...)
For example:
Textarea/Messages: do you allow completely free text, or restrict to alphanumeric and punctuation? I've tried to go the second route, but you always find someone out there that likes using ... |
Similar question was closed on SO.
Sometimes when we're programming, we find that some particular control structure would be very useful to us, but is not directly available in our programming language.
What alternative control structures do you think are a useful way of organizing computation?
The goal here is to get ... |
Possible Duplicate:
What are some well known applications written in F#?
I see a lot of people talking about how cool functional programming is, how awesome Lisp and Haskell and F# are, etc, but what I don't see is them actually being used. Just about every program on my computer is written in either something in t... |
High performance computing means different things to different people. From a pure programming perspective what I gather is that these are loads of individual machines connected by extremely fast interconnect not necessarily based on usual TCP/IP.
My question is on the interconnect side of things: How do you make inte... |
Other than using Emacs / Vim with ctags or cscope or both, are there alternatives to C++ code navigation of an existing code base? I used to use Source Insight on Windows and it worked for me fairly well. The main functionality I am looking for is quickly find definition of macros, variables and functions and places a ... |
I have a couple of developers at my company who wish to move from programming into architecture. What are the best books out there on the theory and practice of software architecture? Include a cover picture if you can.
Feel free to include general books, and also books that relate to a specific technology.
|
Roundup issue tracker is pretty minimalistic by default, and it does not bring any specific workflow with itself. It was once called ‘so configurable that it’s probably better described as a lightweight tracker-oriented framework.’
Have you ever used Roundup extensively or seen some interesting use cases? If so, please... |
I have a thought that I tried asking at SO, but didnt seem like the appropriate place. I think that source sites like Google Code, GitHub, SourceForge... have played a major role in the history of programming. However, I found that there is another bad thing to these kind of sites and that is you may just "copy" code f... |
We will be engaging large corporations to help them run various types of analysis, mostly code analysis of their applications. The storage requirements will likely be modest, hundreds of MB per client.
My question is mostly aimed at finding the stack with existing frameworks, best practices and a community which will ... |
Hypothetically speaking imagine that there exists a coworker that has a very shallow understanding of computing. To avoid stereotyping lets give this coworker the gender neutral name Chris.
Now Chris' diagnostic ability is low and can't figure out the correct IP addresses to set his/her virtual machines to. Chris also... |
Even though I haven't been in a TDD or BDD project, or I have been in some that say they are doing TDD but are pretty far from it, these are things that I think about and really try to read as much as I can about.
Back to the question. When you're doing BDD you should write your "test" first and make it fail, right? A... |
Let's say I am working on an open source project and want to re-use a trivial utility function from another open source project (for example, a file search/replace function). Is it legal to copy the function and simply write a small copyright notice in top of the file? Should I include their name as copyright holders o... |
I'm still at school, and I know I have problems dealing with other people.
I'm not an angry or shy or different, I just like to work my way and with my opinions while respecting other's, I have a big curiosity and hunger for knowledge, but I lack practice and I guess people don't want to work with me because they might... |
I'm working on a site for my company which, up until a certain point, was an Internet Explorer-only site for various reasons, mainly that when the site was originally conceived IE had a 90%+ market share so the work to get it working in other browsers just didn't make sense.
Now that we live in a more diverse browser e... |
I've heard this term bandied about, especially in reference to web development, but I'm having trouble getting a clear understanding of what an Information Architect actually does.
Any ideas what their role or deliverables would be?
|
One thing that I've learnt in my short dev career is that there are best practices (like TDD) and then there are actual practices that occur under pressure, or through budgetary/time constraints.
I'm working in a small PHP dev team on a project using Zend framework. The project has the potential to demand a lot of sca... |
Consider a system that uses DDD (as well: any system that uses an ORM). The point of any system realistically, in nearly every use case, will be to manipulate those domain objects. Otherwise there's no real effect or purpose.
Modifying an immutable object will cause it to generate a new record after the object is persi... |
For a large enterprise app, everyone knows that being able to adjust to change is one of the most important aspects of design. I use a rule-based approach a lot of the time to deal with changing business logic, with each rule being stored in a DB. This allows for easy changes to be made without diving into nasty detail... |
We have a trac server setup that works with the svn commits, so we can do things like "fixed #183" in the commit messages, and reference the changes involved. Right now I have eclipse with subclipse + trac plugins, and it works pretty well.
But I don't have internet all the time and it becomes very difficult to commit... |
Which if the SOLID principles introduced by "Uncle Bob" Martin had the largest effect on your day to day coding? Please give details!
|
I am being approached with a job for writing embedded C on micro controllers. At first I would have thought that embedding programming is too low on the software stack for me, but maybe I am thinking about it wrong.
Normally I would have shrugged off an opportunity to write embedded code, as I don't consider myself an ... |
What are some data structures that should be known by somebody involved in bioinformatics?
I guess that everyone is expected to know about lists, hashes, balanced trees, etc, but I expect that there are domain specific data structures. Is there any book devoted to this subject?
Thanks,
Lucian
|
I'm a big fan of checklists. There is Travel Checklist, Moving Checklist and even a Scrum Checklist.
Context: you have been hired by a large corporation and given the mission to setup the whole software development environment, processes, team, etc. You have "carte blanche". You will be responsible for the creation of ... |
I know this is a very very basic question. For some software applications there are a large almost infinitely high number of test cases for an application. It is not practical to test all those test cases. How do we decide when to stop testing? (other than "when money runs out").
|
For years I have considered digging into what I consider "low level" languages. For me this means C and assembly. However I had no time for this yet, nor has it EVER been neccessary.
Now because I don't see any neccessity arising, I feel like I should either just schedule some point in time when I will study the subjec... |
I'm used to program with Python and GTK using pygtk library.
I feel like my programs are not well separated according to MVC model.
I think following a framework it would help me to design better desktop
applications.
I'd like to know which Python MVC framework for desktop apps you're using and
why.
|
Sometimes I come across these message-hub-style APIs, for example the Cocoa NSNotificationCenter: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/Reference/Reference.html
Usually these APIs provide a global access point on which you subscribe to or bro... |
I want to know in which applications/programming domain are most suitable for Smalltalk. Could anyone please provide me some useful links that could answer my query?
Through googling I learned that some companies use it for:
logistics and foreign trade application
desktop, server and script development
data processing ... |
We've all (almost all) have heard about the horror stories as well as perhaps studied about them.
Its easy to find stories of software that is over budget and late.
I wanted to hear from developers the opposite story:
Question:
Do you know, or have worked on a project that was on budget and on time?
What is the most v... |
As stated in the title, are optional parameters, such as those used in C# helpful or are they a hindrance to application maintenance and should be avoided as they can make the code harder to understand?
|
The situation is that a client requested a number of changes about 9 months ago which they then put on hold with them half done. They've now requested more changes without having made up their mind to proceed with the first set of changes. The two sets of changes will require alterations to the same code modules.
I'v... |
I'm talking about something like this:
echo $form->input('general_addresss', array(
'label' => 'Where will you go today?'
'format' => array('before', 'input', 'after', 'label', 'after', 'error')
));
Do you start with one array parameter, then break a line? If it can't fit on a line... |
This came out of some of the answers and comments on another question (this one).
I've worked primarily with waterfall projects and while I've worked on ad-hoc projects that have taken on agile behaviours and have read a fair bit about agile, I'd say I've never worked on a "proper" agile project.
My question is does th... |
Preface
This is not code golf. I'm looking at an interesting problem and hoping to solicit comments and suggestions from my peers. This question is not about card counting (exclusively), rather, it is about determining the best table to engage based on observation. Assume if you will some kind of brain implant that mak... |
I have recently been assigned to port an old COBOL program. I am used to GUIs, and I can't understand how a TUI works. I searched a lot through Google but couldn't find something.
I knew that console applications could output line by line, but how are colors etc. drawn to the terminal screen? How all this stuff is bein... |
I have seen several times on this site posts that decry Java's implementation of generics. Now, I can honestly say that I have not had any issues with using them. However, I have not attempted to make a generic class myself. So, what are your issues with Java's generic support?
|
It's not that this doesn't make sense, but it just works out awkward 99% of the time.
Often in 2D graphics rectangles are initialized, stored and manipulated as a pair of points. In no particular language,
class Rect:
p1, p2: point
It makes more sense to define a rectangle as two x values and two y values, like th... |
In all projects that I have been involved with that have had input from an outside consultant the question has been asked about what sort of Configuration Management we were using. In none of these cases has the consultant been able to define Configuration Management. So what is it?
|
My question relates to how I should share the fees paid by clients to me and a fellow programmer, both of whom are freelancers.
I've thought of a few options, but I'm in a dilemma as to which one would be the most motivating for both of us.
1) The first option I've thought is a fifty-fifty share. However, more brainwor... |
I am usually fascinated by articles defending PHP and the arguments being used. Quite often authors of these types of articles don't mention what experience they have with other languages. Personally I find it hard to imagine that somebody would know either Python or Ruby, and PHP at a high level and still prefer PHP.
... |
If you're doing a solo project - would you use CI tools to build from a repository? I've used Hudson and Cruise Control in a team environment, where it's essential to build as soon as anyone checks anything in.
I think the value of version control is still obvious, but do I need to build after every commit, seeing as I... |
What C# project(s) would you consider contributing to if you were a beginner trying to sharpen your skills in C# and .NET framework ? The project should be (besides all) active and not something less active and/or stagnant.
|
I'm an experienced Java developer who is just starting up a project for an NGO. I will be working on the project for at least 6 months, following which the NGO will have to pay or find a volunteer to maintain the project. Seeing as they already have people working on their website in PHP, I figured PHP was the obvious ... |
What language, in your opinion, allows the average programmer to output features with the least amount of hard-to-find bugs? This is of course, a very broad question, and I'm interested in very broad and general answers and wisdoms.
Personally I find that I spend very little time looking for strange bugs in Java and C#... |
Why would someone use his own time to develop an open-source project for free and without compensation?
|
Suppose I have some code
void some_block(void)
{
some_statement_1();
some_statement_2();
some_statement_3();
}
Now I wish to out-comment statement #2, but here I never can find a way where it feels right. Usually I will do the following:
void some_block(void)
{
some_statement_1();
// some_statement_... |
If given too little time, quality suffers. If given too much time, developers will find a way to use all alloted time, no matter what. What would be a good way with dealing with estimates? Are they a necessary evil?
|
If I see something I like in another application, and create something similar from the ground up in a commercial product, could I get sued over it?
Of course it would be styled to look differently, however most of the functionality would be the same since the functionality is what I liked about it. It also would not ... |
My (non-technical) colleague has threatened me with a Gantt chart for a new project that we are currently planning. What is this likely to provide for us, and will it be a helpful tool?
|
Next semester (starts in just under 5 weeks), I'm taking System Programming and OOD concurrently. Apparently SP centers on working in C on Linux, and I only have Java and Python experience, so I am a little nervous about this.
For those of you who've taken these at an university, what should I look out for?
I've alre... |
I wonder how do you decide on the version number of your apps, do you really record down all changes made (for a change log)? Then how will you decide how to increment the version number. eg. +0.0.1 for each bug fix or something, +0.1 for each new feature release? or maybe you bundle many changes into +0.1 of your vers... |
Would you refactor your app as you go or focus on completing app first? Refactoring will mean progress of app app will slow down.
Completing app will mean you get a possibly very hard to maintain app later on?
The app is a personal project. I don't really know how to answer "What drives the functionality and design", b... |
As most people agree, encouraging developers to make fast code by giving them slow machines is not a good idea. But there's a point in that question. My dev machine is fast, and so I occasionally write code that's disturbingly inefficient, but that only becomes apparent when running it on other people's machines.
Wha... |
We've all been there:
Your project failed or got cancelled.
The code you spent days working on got rejected by your team.
The design pattern you introduced to the team created chaos.
Everyone ignores your ideas.
My question is, what is the most productive way for a programmer to handle development-related failure... |
I'm creating a RESTfull service for a tree-like resource structure and was wondering what the best URL structure would be?
I have three requirements:
be able to get a collection of root
resources
be able to get an
individual resource
be able to get a
collection of child resources
My current thought is:
/rest/docume... |
If you were looking into a job applicant's background and discovered that he or she has 1200 followers on Twitter and averages 50 tweets per day (more than half of which are during business hours), would it affect your hiring decision? How and why?
Personally, I'd be a little worried about the candidate's ability to fo... |
How is a Ninja programmer defined? If it is just an experienced developer, then is there really no better way to describe that? Ninja sounds like a childish marketing ploy designed to attract developers with delusions of self-grandeur. Or am I missing something? In particular I want to know what qualities of a Ninja ar... |
I've been thinking a lot about the problem of standardization across large companies. For me, the answer is pretty clear: do not arbitrarily standardize on tools just because that's what everyone else does. It's counter-productive.
I'm thinking about source control, bug tracking and testing tools primarily. It see... |
I am having a disagreement with a client about the user authentication process for a system. The nub of it is that they want each user to have a globally unique password (i.e. no two users can have the same password).
I have wheeled out all the obvious arguments against this:
It's a security vulnerability.
It confuses... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.