Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm a contractor and am often brought in on projects to be heads down and just implement features for a deadline. Oftentimes though my pace becomes faster than that of the underlying design. So I often wind up having to create functions/methods to perform a task in a preliminary way while awaiting the final design.
Case in point, currently I was tasked with performing the default sort of some records in a way that is too complicated for the current database design (actually I'd use MySQL's "field" function, except I don't think Java/Hibernate supports it). So I created a function where the records could for the time being be sorted at the application level, that could either be re-implemented, or entirely avoided, once the necessary database design work is done.
My concern is, once all the necessary design is finished (in general and/or specifically as regards the scenario outlined above), I don't want to leave behind a trail of possibly unnecessary functions/methods. Sometimes they might add value to the design, but sometimes they may wind up being an unnecessary layer of indirection in the end.
How concerned should I be about this? What can I do to mitigate this? Typically being a very short term contractor, I usually don't have the time -- or authority -- to implement something such as a "strategy pattern", which might be my inclination if I were actually responsible for the overall design.
I think a certain amount of cruft is to be expected as a code base evolves. Even when you try to be systematic about deleting away old unused code it is hard to remove it all. It's always satisfying to find unused code in my system that I can delete.
Strong typing is your friend here, since it allows you to track types and usages in a much better fashion than weak typing. So stay away from those string data types, they make cleaning up harder.
A really neat trick is if you can replay 24 hours worth of traffic from your production systems over a test system with a code coverage tool running at the same time. That's usually a gold-mine of dead code, but it can be hard to find the time to deal with such large amounts of cleanup among other priorities ;)
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
what is the intention of this:
Simplicity--the art of maximizing the
amount of work not done--is essential.
Among other things, it means that a team can spend an amazing amount of time building a complex system that will handle all possible eventualities - or it can do only what is needed right now, get it right, and get it out the door.
The KISS principle is related - keep the program simple, it will be easier to write, easier to maintain, and out the door faster.
You might prefer:
Simplicity -- the art of minimizing the amount of work done -- is essential.
Basically, this just means cutting out needless effort wherever possible, including within your own agile process.
This translates to:
Always do the simplest thing that does the job required.
As developers we're often tempted to come up with a gold-plated solution that does 101 cool things as well as what is required. This usually takes longer, and will likely be harder to maintain in future. So always do the simplest thing that will actually work.
The Agile manifesto is about project management.
A non-Agile project is filled with work, much of which is a waste of time.
Complex plans and status reports are work, but they have little real value.
Some design documents, walkthroughs and reviews are work, but they create very little value.
Some quality assurance activities are done simply to demonstrate that code will -- eventually -- get done. This is a lot of work to prove that progress will happen in the future.
Non-Agile ("Waterfall") projects are filled with work that is of very little real value.
The Agile manifesto suggests we not do all of this low-value work.
its a definition of simplicity
simplicity:
The Art of (it means Simplicity is an art, if U can think in simple way U can handle ur job Well)
the amount of work not done (U want to handle ur job with a lot of things and doing a lot of works -- above sentence reminds U to do not Do all of the jobs, Do only the essential Jobs)
To maximizing: simplicity can help u to maximize the above sentence, it means that minimize ur job with less cost & time.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
My question is really very important .
When i program i have seen that i had lots of errors in programming logic + structure + a flexible when it goes for testing , i have read many books on OOPS and my all the concept are clear but i do not know where to start design of my code or project . can any body help me how to improve this part of programming skill.
although i work on php+javascript but this question is for all the programmers on stackoverflow
note- usually when i hold paper and pen i think where to start from ..
if i make something problem is how to simplyfy.... and many others which u all are facing / faced
Well, I think everyone is different as is every project. But here is what I personally do...
For my own projects, i.e. no client requirements, I start at one end or the other, either with the database structure or the UI. I then work down through the layers making sure that I maintain clear separation of concerns to make testing (unit and system) as well as maintenance as easy as possible.
One thing to note is that regardless of your approach I think the process is iterative. I will often work, refactor, work, refactor etc so don't get too bogged down with the details and feel you have to stick to them. The requirements are the key thing (whether for yourself or for a client), the technical implementation is largely irrespective.
When dealing with clients the process is somewhat different. You will need to do a fair amount of design up front so again think from one layer to the next trying to keep as much of the logic in the correct layers as possible. As an example you have your DB, then you want a data access layer (DAL) to abstract your code from the DB access. Then you want specific business logic libraries which use the DAL, this abstracts the higher portions of code from the data (they go through the business layer) etc etc.
Just think of each level and try and keep it as generic as possible, that way when you wish to change the storage for the data, you simply change the DAL and everything else works as before...
As far as starting a design of your project is concerned, whole lot depends on what you are developing, that is requirement of the application. So first thing is that you must collect information about the purpose of your application. And when we start to program, a plain trend must be kept in mind, which is, as a universal fact of programming, Input-Process-Output. So, design starts with input. Just collect as much information as you can about what will be required as your input of application. If the input is not made by your user, than it is not required to be mentioned in your front-end design (In Windows language, the so called "Form"). What user will give, is matter of concern in designing the input area (very first step to start project).
During the designing phase, constant interaction is required with user to make effective & flexible start design, as ultimately he/she is going to use. If I'm starting a project's designing, I always consider the user a lazy person, if we keep that thing in mind, our application will be simpler & easy to use. Once, you'll kick-off the start, its just a flow, that'll suggest you next step.
Hope this helps............. :-)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
My team is building a product that has a lot of components that rely on each other. For example, whenever we add a new type of data to the system, we also have to add logging code to track the changes that use that data type. Or, when we add a new UI screen, we have to make sure that its strings are externalized so they can be translated. These things slow down almost every task we do, and sometimes one of the the steps gets forgotten.
The traditional way to handle this problem is to add required checklists and documentation and things like that. How do Agile methodologies handle it?
The design you describe sounds like it might be a little too tightly-coupled. A renewed focus on enterprise patterns (such as Inversion of Control, programming to interfaces, etc) could help a lot.
If you are doing pair programming, you should be checking each other's work, making sure all of the i's are dotted and the t's are crossed.
If you are doing Test Driven Development, your tests should not be passing until all requirements for that particular portion of the development effort are satisfied.
If you are developing a large, complex system, you need experienced developers who understand the design and development process. You may also need a hands-on (read:coding) architect who can oversee the whole process.
Oh, and checklists (despite their traditional nature) are good too.
I'd suggest reading Alistair Cockburn's "”Agile Software Development: The Cooperative Game" - he takes quite an intelligent approach to Agile that's largely "do what gets the job done". That might help you work out how to get some kind of checklist / documentation into what you're doing without making everything horribly top-heavy.
Could some of your problems be solved by better tests? When you talked about not doing things that need to be done, my first thought was "why hasn't a test failed?" Maybe you need to look at tools for testing user interfaces? (edit: or even some small script on commit that greps code for whatever indicates the need for translation strings and checks against the files with the translations in?)
Also, can you change your design so that it's both less coupled and "forces" you to do the right thing. Perhaps making those data types implement a logging interface that the logger delegates to, or similar...?
Depending on your IDE there are various tools to help identify strings that need to be externalized, but if you are in a habit of just not putting in static strings this can be avoided.
If you need to add logging I would suggest AOP, as, at some point you will want to remove the logging code and you risk breaking the application.
But, a long-term, complex system is ideal for agile development, as, while you are developing, the needs of the client/customer may change, and you can adapt to it.
You need to ensure that the customer has feedback on a regular basis (ideally daily, and in a perfect system the customer has a rep sitting by for questions).
When I have many steps that must be done, esp for something like datatypes, I will resort to using a spreadsheet, so, you add a datatype, you add a row to the spreadsheet. Then you can track everything that needs to be done before that datatype is completely added to the application.
Have cross-component teams. That way when you add some functionality, the member(s) from the logging component will update their part and the translator(s) will update the strings.
I think it is important to understand that Agile methodology is only a process framework, not a process in itself. For example it says to follow test driven development and do pair programming but it does not say how to write the tests, or suggest a review checklist or suggest a coding guideline or say what documents to write. Those parts are entirely upto you or your organization to define and follow.
When planning a feature, you can add a engineering task called "review" and allot time for it. You could do the review task in whatever way works best for you and your organization. If pair programming doesn't work as well as a formal inspection for you, you should do formal inspections.
Do what needs to be done, but not more:
better definition of done (the definition of done is a kind of checklist to me),
better testing,
"just enough" documentation (Agile != no documentation),
etc.
Well, where I work we have QA that can catch some of the bugs if there are missing requirements or something slips through. I'm not saying the development team is intentionally putting in bugs, but as a codebase grows, it becomes harder and harder to remain nimble and thorough in checking everything.
Wikis can be useful for capturing methods used to try to get the clearest requirements. By clear I mean that the story card isn't likely to list all the requirements and that there may be discussions with an end-user or business analyst to get their understanding of what is desired. Part of our sign-offs involve getting an end-user to see the functionality and approve it before moving from the development environment.
Once every handful of sprints, we may have most of a sprint devoted to bug fixing/refactoring so that things can be cleaned up that would otherwise not get done as they aren't likely to be important. This can be cosmetic bugs or broken windows that while they have little business value initially can be useful in the long run.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Can Agile/XP go together with layered approach?
Should Agile/XP go together with layered approach?
Breaking the source code into layers requires extra efforts and thereby increases the development-time significantly.
N.B : By 'Layers' I mean separate assemblies with POCO, DA, etc.
Agile/XP is an approach to managing your project activities, deliverables and timelines.
Layered (N-tier) applications are a way to improve maintainability, scalability, and the ability for team members separate areas of responsibility.
They don't have much to do with each other, except that they both will require an additional investment in time if you're not familiar with each. Both will tend to improve the quality of your project if used properly, compared to traditional alternatives.
It seems to me instead that the agile warning "You Ain't Going to Need It" is not to avoid complexity altogether, but to avoid adding NEEDLESS complexity. Indeed, one of the benefits of unit testing is to set up a discipline wherein you can fearlessly refactor so stuff ends up where it belongs, rather than where it may have started.
So the point is not to avoid layers (or tiers, if you must) -- the point is to avoid layers that suck.
The two are entirely orthogonal.
In XP you develop the system feature by feature. As you add features you continually refactor the system to ensure that it's implementation is as clear as possible. Layers usually fall out of that refactoring. As do tiers if that architecture is appropriate, or other large-scale architectural structures such as SEDA or REST.
I think they real question here is should have developers divided up by layers on a team- should you have an html dev, a js dev, a middle tier person, a messaging system person, and a dba all working together to build a CRUD form, or should you build by feature and let one person own the thread. The latter is preferable in agile- specializing generalists are preferred to specialists.
Is it sensible to have several teams working together on an Agile project? Yes: I've worked on a large-scale project with 200+ developers across 15+ teams. There were about 20 or 30 services in all.
Can this be done with specialised teams? Not really.
Can the members of the teams have specialisations? Yes, but you really need generalists with strengths in some areas rather than people who only know one thing and won't touch anything else.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Maybe my understanding of agile development isn't as good as it should be, but I'm curious how an agile developer would potentially use off-the-shelf (OTS) software when the requirements and knowledge of what the final system should be are changing as rapidly as I understand them to (often after each iteration of development).
I see two situations that are of particular interest to me:
(1) An OTS system meets the initial set of requirements with little to no modification, other than potential integration into an existing system. However, within a few iterations of development, this system no longer meets the needs without rewriting the core code. The developers must choose to either spend additional time learning the core code behind this OTS software or throw it away and build from scratch. Either would have a drastic impact on development time and project cost.
(2) The initial needs are not like any existing OTS system available, however, in the end when the customer accepts the product, it ends up being much like existing solutions due to requirement additions and subtractions. If the developers had more requirements and spent more time working on them up front, this solution could have been used instead of building again. The project was delivered, but later and at a higher cost than necessary.
As a software engineer, part of my responsibilities (as I have been taught), are to deliver high-quality software to the customer on time at the lowest possible cost (among other things). Agile development allows for high-quality software, but in some cases, it might not be apparent that there are better alternatives until it is too late and too much money has been spent.
My questions are:
How does off-the-shelf software fit in with agile development?
How do the agile manager and agile developer deal with these cases?
What do the agile paradigms say about these cases?
Scenario1:
This can occur regardless off the OTS nature of the component. Agile does not mean near-sighted.. you'd need to know the big chunks.. the framework bits and spend thinking time on it beforehand. That said, you can only build to what you know .. Delay only till the last responsible moment.Then you need to pick one of the alternatives and start on it. (I'd Avoid third party application unless the cost of developing it in-house is infeasible.. but that's just me). Prototype multiple solutions to check feasibility with list of known requirements. Keep things loosely coupled (replacable), easy to change and full tested. If you reach the fork of keep hacking or rewrite, you'd need to think of which has better value for the business and pick that option. It's comes down 'Now that we're here, what's the best we can do now?'
Scenario2:
This can happen although the chances are slim compared to the team spending 2-3 months trying to get the requirements 'finalized' only to find that the market needs or customer minds have changed and 'Now we want it this way'. Once again, its a question of what is the point of time till which you are prepared to investigate and explore before committing on a path of action. Decide wisely with whatever information you have upto that point.. Hindsight is always 20-20 but the customers wont wait forever. You can't wait till the point of time where the requirements coalesce to fit a known OTS component :)
Agile says Do whatever makes sense and strip out the non-value-adding activities :) Agile is no magic bullet. just my 2 agile cents :)
Not a strict answer per se, but I think that using off the shelf software as a component in a software solution can be very beneficial if:
It's data is open, e.g. an open database or a web service to interact with it
The off the shelf system can customised easily using a similar programming paradigm to the rest of your solution
It can be seamlessly adapted to the rest of your work-flow
I'm a big fan of not re-inventing the wheel, and using your development skills to design the 'glue' between off-the-shelf solutions can be a big win.
Remember 'open' is the important part, and a vendor will often tout their solution as open when it isn't really.
I think I read somewhere that if during an iteration you discover that you have more than 20% more work that you initially thought then you should abandon the sprint and start planning a new one taking into account the additional work.
So this would mean replanning with the business to see if they still want to go ahead with the original requirements now that you know more.
At our company we also make use of prototyping before the sprint to try and identify these kind of situations before they arise on a sprint. Although of course that still may not identify the kind of situation that you describe.
C2 wiki discussion: http://c2.com/cgi/wiki?BuyDontBuild