Showing posts with label agile. Show all posts
Showing posts with label agile. Show all posts

Friday, April 21, 2017

Feature Toggling

From Wikipedia -
feature toggle[1] (also feature switchfeature flagfeature flipperconditional feature, etc.) is a technique in software development that attempts to provide an alternative to maintaining multiple source-code branches (known as feature branches), such that the feature can be tested, even before it is completed and ready for release. Feature toggle is used to hide, enable or disable the features, during run time. For example, during the development process, the developer can enable the feature for testing and disable it for remaining users.[2]
Continuous release and continuous deployment provide developers with rapid feedback about their coding. This requires the integration of their code changes as early as possible. Feature branches introduce a bypass to this process.[3] Feature toggles are an important technique used for the implementation of continuous delivery.
The technique allows developers to release a version of a product that has unfinished features. These unfinished features are hidden (toggled) so they do not appear in the user interface. This allows many small incremental versions of software to be delivered without the cost of constant branching and merging. Feature toggles may allow shorter software integration cycles.[4] A team working on a project can use feature toggle to speed up the process of development, that can include the incomplete code as well.
I have been looking at implementations to accomplish this and came across Togglz - Features flag for Java.   Looks pretty easy to use.   This looks interesting as well Togglz aspect with Spring Boot - Insane Programming.  

I am looking to try to implement feature toggling and would be interested to hear about your experiences.   

Tuesday, November 15, 2016

Context switching kills productivity... Here are a few things I found helpful to get stuff done.

I read this post today and completely related to it...

It feels like this is our nightmare.   Context switching, meetings, emails, instant messages, phone calls, more meetings,  more emails, more distractions.    It is sometimes an almost an impossible task to make progress on our tasks, goals, innovations.....   

If I get an hour or two of focus during the work day it is a miracle.   Feels like the only way to get things done is to work at 10pm at night after family stuff is done and the emails and other distractions have come to a halt.    

Here are some things that I have tried and seem to help me to be more focused during the workday without going completely dark.

  • Leverage a persistent team chat software like (Slack, Hipchat, Flowdock, etc.)   I am currently using Flowdock at my current job and it has been a great tool for my team.   We have been able to eliminate almost all internal team emails.  Instead of trying to catch up with tons of emails we can now goto one place to see what is going on with the team.  
  • Block off time in the calendar.  
  • Use Lync/Skype Busy and Do Not Disturb.   
  • Pomodoro Timer.   Pomodoro Technique® and Scrum: Objective IV | Devoted Developer  I use the timer for when folks come by my desk and I really need to focus.  A Pomodoro is usually 25 mins.  If I am in the middle of one and someone stops by I quickly look at the timer and ask them if I can stop by in X minutes when my Pomodoro is done.   Most of the time this is acceptable.
  • TDD.  TDD allows you to continually develop in an iterative fashion with tests that not only make sure the code does what I expected to do but also makes it easier to stop/start developing.   Without this it takes allot longer to figure out where you left off when you get back to developing.

I am interested in hearing what others are doing to help focus and get things done in our challenging environment of distractions.

Monday, December 21, 2015

Try to avoid using Static Methods in your code

I have been coming across allot of static code in the projects I work on.  It really makes practicing TDD, or any unit testing, a pain because static methods are not easily mocked.   Static methods also force your code to be highly coupled.  

A better approach is to not use static methods and instead use dependency injection.   This lends itself to being a better testable decoupled approach. 

Here are a few articles I have come across that do a pretty good job better explaining why you should try to avoid using Static in object oriented languages:

Monday, October 5, 2015

Great presentation: Are You a SOLID Coder?

http://www.infoq.com/presentations/solid-principles

Great presentation.  Check it out.


Friday, July 31, 2015

Great article on 12 reasons for writing unit tests



Top 12 Reasons to Write Unit Tests
Most programmers do not write tests. We all know that we should write them, but for whatever reason, most of us don't. This is unfortunate, because testing is the most powerful tool we know of to improve software quality. Tests reduce bugs, provide accurate documentation, and improve design.
In our consulting work we hear every excuse imaginable for not writing tests. For example:
  • "I don't know how to write tests."
  • "Writing tests is too hard."
  • "I don't have enough time to write tests."
  • "Testing is not my job."
  • "My code is too simple for tests."
  • Blah, Blah, Blah ...
We hope that by writing this article we can dispell these myths and encourage programmers to do the right thing and write tests!
Tests Reduce Bugs in New Features
We advocate writing tests as you write new code. Tests do not eliminate bugs, but they dramatically reduce the number of bugs as you add new features.
Tests Reduce Bugs in Existing Features
With well-tested code, introducing new features rarely breaks existing functionality. If a new feature breaks existing functionality, existing tests fail immediately, allowing you to pinpoint the problem and fix it. Without the tests, you may introduce a bug that is not found for days or weeks.
Tests Are Good Documentation
A concise code example is better than many paragraphs of documentation. We see this time after time in our consulting work. Far too often, teams produce boilerplate documents that are of little practical value. When programmers need to learn an API, they search for code examples. Tests are among the best code examples because they are concise snippets of code that exercise public APIs.
Tests Reduce the Cost of Change
Tests make it easier to change software because you have confidence that changes do not break existing functionality. When you have good test coverage, you have confidence to explore new design ideas without fear of introducing new bugs.
Poorly-tested software becomes increasingly expensive to change as time goes on. Risk increases dramatically as the system becomes more complex because it becomes more and more likely that changes inadvertently break things that used to work.
Tests Improve Design
Writing tests forces you to make your code testable. Specifically, you tend to rely less on dubious patterns like singletons and global variables, instead making your classes loosely-coupled and easier to use. Code that is tightly-coupled or requires complex initialization is hard to test.
Tests Allow Refactoring
With tests, you are more able to change code throughout the lifetime of an application. Tests provide a safety net, allowing you to refactor at any time without fear of breaking existing code, so you can constantly improve the design of your program.
Tests Constrain Features
Far too often, programmers build fancy frameworks rather than deliver features customers want. When you adopt a test-first approach, you start by writing tests for the current feature. You then implement the feature. When the tests pass, you know you can stop and move to the next feature. Well-tested applications are more easily extended; therefore, you don't have to anticipate what the customer will eventually request.
Tests Defend Against Other Programmers
Textbook code is simple, but real-world problems are hard. We find that in real applications, you often encounter very subtle bugs due to Java bugs, quirky business rules, operating system differences, etc. These bugs may only manifest themselves under very peculiar scenarios.
Let's suppose you find that a payroll calculation routine removes a zero from everyone's salary, but only if the routine runs at 11:59 PM on New Year's Eve. Now, suppose that the bug fix involves a single-line code change.
Without a test, another programmer may come in and change that code. Unless they run the application at 11:59 PM on New Year's Eve, they won't know that they just re-introduced the bug and will cause countless bounced checks next year. With a test, however, you can ensure that when the programmer changes the code, the test breaks and informs the programmer of the problem.
Testing Is Fun
If you thrive on challenges, then testing is a lot of fun. Coming up with automated tests is difficult, requiring creative solutions for complex problems. Just like coding is an art, testing is an art.
In many organizations, testing is relegated to the least-experienced programmers. We often encounter the misconception that testing consists of people completing written checklists as they manually execute the application. This approach is completely unscalable, because it takes longer and longer for humans (monkeys?) to test every feature as the application grows.
Modern OO languages like Java are complex, particularly when it comes to dependencies between classes. One change can easily introduce bugs in seemingly unrelated classes. Gone are the days when each character-based screen is a standalone program. OO apps are far more complex and demand automated tests.
Writing automated tests is harder than writing the code itself, in many cases. The most expert programmers are the best testers. When faced with seemingly mundane coding tasks, coming up with creative tests provides an intellectual challenge that expert programmers thrive on.
Beginners typically need expert assistance when writing tests. This is where pair-programming helps, because experts work side-by-side with beginners as they learn the art of testing.
Testing Forces You to Slow Down and Think
When adding a new feature or refactoring an existing solution, testing forces you to think about what the code is supposed to accomplish. By writing tests first, you think about how to use the public API and what the ultimate outcome should be. Thus you end up with a clean and simple design that does exactly what you expect it to do.
Testing Makes Development Faster
On a class-by-class basis, testing slows you down. It takes time to think about and produce good tests. But as time goes on, your overall velocity increases because you are not constantly worrying about breaking existing code as you add new features.
We have also found that with good tests, we can ignore internal implementation details during the first iteration. Provided that we get the public API right, we can improve internal design and algorithms later, again without fear of breaking something. We have used this specifically for things like sorting algorithms. In the first iteration, we do something quick and dirty, like a bubble sort. We can always come back later and replace it with a better algorithm, if necessary.
Tests Reduce Fear
One of the biggest fears that programmers encounter is making a change to a piece of code and not knowing what is going to break. Having a complete test suite allows programmers to remove the fear of making changes or adding new features. We have found that we do not hesitate to change and improve well-tested code, whereas we fear changing untested code.
Eric M. Burke is an O'Reilly author and a principal software engineer with Object Computing, Inc. in St. Louis, MO.
Brian M. Coyner is coauthor of the Java Extreme Programming Cookbook and a Senior Software Engineer with Object Computing, Inc. in St. Louis, Missouri.

Friday, June 12, 2015

Agile Software Development Videos from Bob Martin

Here are some really good videos about agile development.   Bob Martin is a great presenter. 

These are all pretty long but they are all worth watching.   The first 3 in the list below are my favorites.

Professional Software Development

Craftsmanship and Ethics

Demanding Professionalism


Clean Architecture and Design

The Single Responsibility Principle


The SOLID Principles of OO and Agile Design

Tuesday, January 22, 2013

Cool Online Agile Board

http://leankit.com/

I stumbled across this tool today and it looks pretty neat. 

The free account allows for 25 users and 10 boards.