• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Writing notes before actual coding?

 
Sheriff
Posts: 16201
270
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suggest you try it out yourself. You don't learn how to swim by listening to someone explain how they do it or reading about how someone trains for a swim meet. You learn to swim by getting in the pool and actually trying to do it.
 
Ranch Hand
Posts: 2449
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote:I suggest you try it out yourself. You don't learn how to swim by listening to someone explain how they do it or reading about how someone trains for a swim meet. You learn to swim by getting in the pool and actually trying to do it.



Thanks.I will surely do that. Also ,if I take the example of online Shopping Application, I can think of simplest flow as list some items on the front end.

To quickly come up with this , instead of putting in the database ,initially I will set some data in a list in the Model and show using it.

I would park other work for later such as putting this in the database and making the controller call an API to return this and adding other features.

It seems, I got the answer. The aim has to be to think of a quick flow one can get running and then build/refractor.
 
Junilu Lacar
Sheriff
Posts: 16201
270
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One thing I try to avoid doing early on is anything to do with the frontend. Frontend is more difficult to unit test. I prefer to test my model and service objects. I prefer focusing on interesting behavior. If I were doing that exercise, I would probably just focus on things like "Add item to cart" and "Count items in cart" first. To me, the more interesting object to start with would be a Cart object. I wouldn't care about UI-related concerns until much later in the process.
 
Monica Shiralkar
Ranch Hand
Posts: 2449
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote: I prefer focusing on interesting behavior.



Thanks. All I could think about while thinking about the behaviour to target upon in step 1(think about a little bit of functionality I want the program to have), is some functionality which even small would get a flow working such that later one can target on adding full features and refactoring. In that context ,what is meant by "intresting behaviour".Does it mean "core behaviour"?
 
Junilu Lacar
Sheriff
Posts: 16201
270
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any behavior that's more involved than just returning a field value or setting a field value. Something like "getDescription()" or "getID()" is not interesting. "Calculate total" or "Apply discount code" is more interesting.
 
Monica Shiralkar
Ranch Hand
Posts: 2449
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.Overall, I find the 5 steps you had listed very useful be it for experienced developers or new ones as one should always try to learn the better ways of development. One of the most useful threads I came across on the forum.
 
Monica Shiralkar
Ranch Hand
Posts: 2449
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:1. objective: average 5 numbers. No more, no less. Do not average 4. 6 is right out.

2. major functions:
  A Read numbers
  B average them
  C print the average

3.



1 is the task on what is to be done.
Is 2, the notes you would make before coding this task.
Is 3 related part of this or a separate illustration ?
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic