10 Replies - 1031 Views - Last Post: 01 November 2012 - 09:09 PM

#1 RozenKristal  Icon User is offline

  • D.I.C Regular

Reputation: 45
  • View blog
  • Posts: 346
  • Joined: 29-September 12

How you guys approach a problem then design and code it?

Posted 31 October 2012 - 02:46 PM

I seeking advice from the members here.. Seriously, I need to change. My first initial reaction is panic... and totally lost, I dont know what I need to do.......
Sometimes, my brain even stop working, like today... when I suppose to use a function to assign a value from another object to this object.
Usually I would do obj.function(anotherObj.getValue())... something like that, guess what I did?
I did this... obj.function() = anotherObj.getValue()... wow can you guys believe that... I been learning for a while and can even help out some people asking questions here on the forum... yet... I think I need help ~_~ at this rate, I dont even wanna know what will happen when I get to higher classes...

And I talking about java btw..

This post has been edited by RozenKristal: 31 October 2012 - 02:49 PM


Is This A Good Question/Topic? 0
  • +

Replies To: How you guys approach a problem then design and code it?

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5535
  • View blog
  • Posts: 11,861
  • Joined: 02-June 10

Re: How you guys approach a problem then design and code it?

Posted 31 October 2012 - 02:54 PM

See the link in my signature block for "homework help"? Read the article. That is how I suggest approaching such things.
Was This Post Helpful? 2
  • +
  • -

#3 RozenKristal  Icon User is offline

  • D.I.C Regular

Reputation: 45
  • View blog
  • Posts: 346
  • Joined: 29-September 12

Re: How you guys approach a problem then design and code it?

Posted 31 October 2012 - 03:02 PM

thank tlhIn, do you have any solution for brain crashing? Sometimes I cant think at all. I mean absolutely zero processing power...
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5535
  • View blog
  • Posts: 11,861
  • Joined: 02-June 10

Re: How you guys approach a problem then design and code it?

Posted 31 October 2012 - 05:19 PM

Cut down on the caffeine? See a shrink about your anxiety?

Then perhaps this isn't the best career choice. I wouldn't have been good at food service or air traffic controller. I don't have the temperament or emotional skillset for those jobs. Sometimes it becomes necessary to recognize the difference between desire and skills. My daughter might love and want to be a professional singer. But she lacks the biological edge for it, voice wise. Just because I might have dreamed of being a football player doesn't mean I was graced with the skills. Coding is no different.
Was This Post Helpful? 1
  • +
  • -

#5 RozenKristal  Icon User is offline

  • D.I.C Regular

Reputation: 45
  • View blog
  • Posts: 346
  • Joined: 29-September 12

Re: How you guys approach a problem then design and code it?

Posted 31 October 2012 - 05:38 PM

I guess I need to sleep a little more and cut down the caf, coding wise, when I understand the stuffs, it not really bad, I enjoy it. Thank for the advice
Was This Post Helpful? 0
  • +
  • -

#6 karabasf  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 202
  • View blog
  • Posts: 417
  • Joined: 29-August 10

Re: How you guys approach a problem then design and code it?

Posted 01 November 2012 - 01:00 AM

It depends on how you view your problem. Is it more related to the coding language and mismatch of understanding the basics? If yes, read more in the basics and recap them.
Next to that, try to understand error messages and trace them back. Don't be afraid to place breakpoints or to go step by step over your code. Effective and proper debugging has been and will always be a life saver in writing software.

But on the other hand, if the problem is more related to software design in general (e.g. you get a big assignment and you have to solve it) the problem differs, as this will be more related to software design itself (and starting software projects from scratch). What helps in this situation (encountered several of them) is to plan beforehand. Determine what you need and how you want to do it. Just brainstorm first and move items around till you're more or less satisfied with it. (One of the reasons why I love whiteboards and post-its)
Although I know it is not always possible with (University) assignments, planning and dissecting your problem is way more effective than jamming in code directly. Of course, this does not necessarily mean that your code will be flawless in the beginning, but this workflow gives at least some insight in the problem itself.

And finally, what always helps is just taking a walk (or doing something else than staring at your screen). Most of the time I get an "eureka" moment after a one hour walk. (especially when I get stuck)

Hope this helps you out ;)
Was This Post Helpful? 1
  • +
  • -

#7 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5535
  • View blog
  • Posts: 11,861
  • Joined: 02-June 10

Re: How you guys approach a problem then design and code it?

Posted 01 November 2012 - 07:55 AM

Whiteboards. Lots of Whiteboards. Draw it out. Not the GUI, that's trival and last anyway. But the logic, the objects, the interaction of parts. How do you eat an elephant? One little bite at a time.

If you have this big scientific calculator project then break it down.
  • One black box is the keypad
  • One is the display
  • One is the calculation engine
  • Oh, you might want a feature to show simple and complex mode: Thus an enumeration
Draw out boxes on your whiteboard for each black box of code logic. How do they need to interact? What do you have to plan ahead for?
Was This Post Helpful? 1
  • +
  • -

#8 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7807
  • View blog
  • Posts: 13,200
  • Joined: 19-March 11

Re: How you guys approach a problem then design and code it?

Posted 01 November 2012 - 08:11 AM

Seconded and thirded on the whiteboard work. Draw it out, make your mistakes in a format that's easily erased. If you have something you like, take a snap with your phone. You'll never look at it, but it'll make you feel better. Then erase it and keep working.

Your goal is to subdivide the problem - this is true for OO programming in java or C++, or for functional programming in scala or python, or for anything really. The different paradigms just give you different ways to subdivide. If a problem makes you freak out, think about how to turn it into smaller subproblems, and try to solve those. Repeat until you're down to basic operations.

If you're finding that you're usually freaking out about problems, maybe you're taking on stuff that's bigger than you're ready for. Try smaller problems for a little while. Try working through the assignments in a beginning Java book, from start to finish. The first ones will be trivial, but do them all.

Sounds like you might also want to work on tracking your time usage. Get an egg timer. Work for 45 minutes, break for 10, and use 5 to write down what you worked on in that hour and what you want to do in the next hour. Amazing what you can learn that way.
Was This Post Helpful? 1
  • +
  • -

#9 RozenKristal  Icon User is offline

  • D.I.C Regular

Reputation: 45
  • View blog
  • Posts: 346
  • Joined: 29-September 12

Re: How you guys approach a problem then design and code it?

Posted 01 November 2012 - 11:31 AM

Thank guys, I would try to do these steps and see if there is an improvement... I used to be calm in front of problems, even biggest exams of my life.. yet nowadays, I freak out at small things... shame on me.
Was This Post Helpful? 0
  • +
  • -

#10 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: How you guys approach a problem then design and code it?

Posted 01 November 2012 - 09:06 PM

The best way is to make sure you get enough sleep. If you think that you can stay up all night with a code, that certainly isn't going to do good as you probably won't get anywhere with it as your mind would have switched off by then. The best time to revisit the code is early morning where your mind would have been refreshed after a nice sleep.

And always schedule your day. Most often, people forget to do this and in the end, they don't find time at all for the high priority items.Say,you schedule a particular task for 2 hours, there is probability of finishing the task before the 2 hours are up.When that happens, don't just be complacent about it. Take a small break by walking around and get back within a few minutes to the next task in hand. That way, you will notice that you will have enough time for your tasks and will be able to complete them well in advance and thus reduce the unnecessary tensions that you face.

regards,
Raghav
Was This Post Helpful? 0
  • +
  • -

#11 RozenKristal  Icon User is offline

  • D.I.C Regular

Reputation: 45
  • View blog
  • Posts: 346
  • Joined: 29-September 12

Re: How you guys approach a problem then design and code it?

Posted 01 November 2012 - 09:09 PM

I see... I have the habit of leaving tasks undone till the last minute for a few years... it gotta change. May be that is the reason why I am so bad at doing stuffs, and have those stress...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1