Tag Info

Hot answers tagged

89

I like Jeff Atwood's approach to this which can be found here http://www.codinghorror.com/blog/2008/08/quantity-always-trumps-quality.html. Basically in the article he references a passage from the book Art & Fear by David Bayles and Ted Orland. The passage goes: The ceramics teacher announced on opening day that he was dividing the class ...


48

When designing a project and laying out the architecture I start from two directions. First I look at the project being designed and determine what the buisness problems is that needs to be solved. I look at the people who will be using it and start with a crude UI design. At this point I am ignoring the data and just looking at what the users are asking ...


43

I think everything on your list is micro-optimization, which should not generally looked at, except for using an O(n*n) vs O(NlogN) algorithm on a 100 item list which I think should be looked at. Sure, that list is 100 items right now, and everything is fast for small n, but I'd be willing to bet soon that same code is going to be reused for a several ...


30

I like dividing my projects into layers That way it's easier to manage cyclic dependencies. I can guarantee that no project is importing the View project (layer) by mistake, for example. I also tend to break my layers in sub-layers. So all my solutions have a list of projects like this: Product.Core Product.Model Product.Presenter Product.Persistence ...


30

One possibility that no one else seems to have mentioned is that you're doing just fine and your managers aren't very good. How are they measuring productivity? Can they give you specific examples or is it just a general perception? Have they taken into account the amount of time spent fixing other peoples' work compared to yours? I've seen plenty of people ...


19

Most of what people think is important is not important. Typing speed is not important. Faster machines or tools are not important. We are not typists or machine operators. We are thought workers. We are decision makers. What is important is using feedback to continually improve your decision making process. The only way to do this, like acquiring any other ...


16

There are a couple of flaws in your Team Lead's argument: Well-designed classes and enums are intended to be used anywhere in your project, not just where they may make sense logically. Classes and enums that are properly documented with XML comments are very self-describing, by merely hovering over the item referencing it. You can always get to a class or ...


13

Organizing Projects I typically try to divide up my projects by namespace, like you say. Each tier of an application, or component is its own project. When it comes to how I decide how to break my solution up into projects, I focus on reusability and dependencies of those projects. I think about how other members of my team will be using the project, and ...


13

A looooooong time ago, in my first job, I wrote code for embedded systems. These systems used 8086 microprocessors, and had limited memory. We used the Intel C compiler. One system I built needed to access a 3-d array of structures. I built it just like the book told me: call malloc for the 3 dimensions, then allocate rows for the next dimension, then ...


13

Large code bases aren't designed, they evolve. A lot of things that don't make sense when looking at a current snapshot, make perfect sense when you take history into account. And I don't just mean the individual history of the code base, I also mean the history of software engineering practices in general. Unit testing pretty much always existed to some ...


12

In practice, performance is seldom an issue that needs to be managed at that level of detail. It's worth keeping an eye on the situation if you know you're going to be storing and manipulating huge amounts of data, but otherwise, you're right, and better off, keeping things simple. One of the easiest traps to fall into -- especially in C and C++ where you ...


11

An Assembly is the unit of deployment for a .NET application; therefore you should consider matching the cut of your assemblies with your deployment architecture. Assemblies are also useful when you need separate version control on some code. For example, when you have common interfaces that would benefit from independent version control, you should ...


11

Separate the shared code off into a library, and include the library in the projects. As an Android developer, you're presumably using Java. Consider using a dependency management tool like Maven or Ivy. A side effect is that this will help maintain separation of concerns by enforcing modularity. The cost is that it may take some work to separate; the ...


10

If you are processing large images and iterating over every pixel, then performance tweaking can be critical.


10

Ideally, all work which can be thought of as part of re-usable code, should be created in the form of library. The balance work, is application which should be separate where main() will reside. But main() alone doesn't have to sit in isolation. Functions like parse_arguments(argc,argv) should be along with main rather then separate.


9

It's quite possible that actually, you are being asked to sacrifice some quality, for greater speed. In some development environments, (i'm thinking in particular of "internal toolsmith"), but there are probably others, it is simply not worth the extra time to produce something polished, when "just good enough" will do.


9

I have found myself responsible for software development best practice amongst groups of MATLAB users on more than one occasion. As Zellus correctly points out, MATLAB users are not normally software engineers, but rather technical specialists from some other discipline, be it finance, mathematics, science or engineering. These technical specialists are ...


9

One company I've worked for had the same problem, and the approach to tackle the problem was this: A common framework for all new projects was created; this includes all stuff that has to be the same in every project. E.g. form generating tools, export to Excel, logging. Effort was taken to make sure that this common framework is only improved (when a new ...


8

It sounds like you are doing all the good things - that in the medium term will make you faster, so it is not obvious if you are actually slow. Only you really know that. ( but it is a very real possibility - PeopleWare claims an up to 10X productivty difference between developers for the same task ). So I have some suggestions for you : Time is a ...


8

Let me tell you a bit about the why behind the culture. If you're closer to 40 than to 20, and you've been programming for a living through your adult years, then you came of age when C++ was really the only game in town, desktop apps were the norm, and hardware was still greatly lagging software in terms of bandwidth/performance capabilities. We used to ...


8

While the Maven Standard Directory Layout kind of specific to Java, but it may serve as a good basis for other types of projects as well. Here is the basic structure (you could replace the 'java' directories with 'php','cpp', etc): src/main/java Application/Library sources src/main/resources Application/Library resources src/main/filters ...


8

I have never been a fan of including existing projects that belong to other solutions. There are too many variables where making an edit to that project for 1 solution completely breaks something in another solution. Then by fixing that problem you end up breaking the original solution. Lather, rinse, repeat. When this kind of dependency leaks into multiple ...


8

There is no industry standard as such. You could look into sample Apple Source Projects to see how they do it.. You could however, try organizing your files into Groups & associate each group to a folder.. Organize all Controllers in One Group with Subgroup for each usecase. Put all views in One Group and subgroup for each usecase. Organize All ...


8

You are right. Your suggestion allows a programmer to import static Constants.BankAccount.* and eliminate countless repetitions of 'BANKACCOUNT_'. Concatenation is a poor substitute for actual scoping. That said, I don't hold out a lot of hope for you to change the team culture. They have a notion of proper practices, and aren't likely to change even if ...


7

there's already 10 answers here and some are really good, but because this is a personal pet peeve of mine... premature optimization which a) takes way more time to do than a simple solution b) introduces more code where simple solution would've been half the size and half the complexity and c) makes things less readable is ABSOLUTELY should be avoided. ...


7

I can't really give you much advice related to webprojects, but here's how I structure my tree in a programming project (mainly from a C/C++ perspective): / src — Source files written by myself ext — Contains third-party libraries libname-1.2.8 include — Headers lib — Compiled lib files Donwload.txt — Contains link to ...


7

Yes. And also assemblies. I'd separate by layers, then components. Yes. There are different approaches to this, but I'd have an IDatabaseService (abstracting the various manners in which the database is called -- this can almost be a direct mapping of the ExecuteScalar/ExecuteNonQuery/ExecuteReader), and then various data access classes that partition by ...


7

GUI classes can quickly grow into a ball of mud if they're not managed carefully. Simple refactoring will do the trick. Some tips: Push everything that's not directly related to the GUI into separate classes. Refactor as much of the remaining code as possible out of the event handlers into their own methods. Use #regions to separate the event handlers ...


6

This doesn't answer your actual question, but may be of help. Consider cross platform tools There are layers such as PhoneGap, that would allow you develop apps accross multiple platforms in one language. Also, a cross platform language, such as haXe might be of interest (you can use the C++ backend for native apps, and the JS backend for web and mobile ...


6

It sounds like the fundamental problem is not just code repository maintenance, but a lack of suitable architecture. What is the core/essence of the system, that will always be shared by all systems? What enhancements/deviations are required by each customer? A framework or standard library encompasses the former, while the latter would be implemented as ...



Only top voted, non community-wiki answers of a minimum length are eligible