7 Replies - 962 Views - Last Post: 02 December 2012 - 09:52 PM

#1 danzar  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 108
  • Joined: 10-December 08

Google search

Posted 08 November 2012 - 08:49 AM

I just wanted to know if seasoned developers search and find examples of code?
It seems to me that half my programming time is just reading and reviewing code that someone has wrote. I find myself copying there code putting it into a test program and picking it apart to learn how it works then after understanding it completely. I rewriting it to work as I need it too. I want to know if that is the normal or is it a bad habits?

This post has been edited by danzar: 08 November 2012 - 08:50 AM

Is This A Good Question/Topic? 1
  • +

Replies To: Google search

#2 AthenaDX  Icon User is offline

  • D.I.C Regular

Reputation: 101
  • View blog
  • Posts: 306
  • Joined: 26-October 12

Re: Google search

Posted 08 November 2012 - 08:58 AM

That is quite normal, from what I've heard and seen from my fellow developers. As you code more and more, you'll end up doing that less however. You'll run into something you're not 100% sure about, look up a code snippet, then go AHA and do what you were doing. Not a bad habit as long as you're not copy pasting long bits of code and not learning anything. :)
Was This Post Helpful? 3
  • +
  • -

#3 tlhIn`toq  Icon User is online

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

Reputation: 5316
  • View blog
  • Posts: 11,365
  • Joined: 02-June 10

Re: Google search

Posted 08 November 2012 - 09:29 AM

I google for examples all the time.
Right now I'm making the move to VS12 and also trying to teach myself MySQL.
So I'm looking up examples of how a query should be formatted.
Also checked the new BoolToVisibilityConverter class in .NET 4.5

But as Athena rightly points out you should be looking up examples, not big chunks of code to just copy/paste to your applications. You want to be a developer not a plagiarist.
Was This Post Helpful? 3
  • +
  • -

#4 danzar  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 108
  • Joined: 10-December 08

Re: Google search

Posted 08 November 2012 - 09:38 AM

View PosttlhIn`toq, on 08 November 2012 - 09:29 AM, said:

But as Athena rightly points out you should be looking up examples, not big chunks of code to just copy/paste to your applications. You want to be a developer not a plagiarist.


Well I see copying/paste to mine/your app wrong for two reasons. One being I want to understand what is happening. and unless I can write the code I truly don't understand what is going on. The second one is, what if the code example is the incorrect way to address what ever the issue is.
Was This Post Helpful? 0
  • +
  • -

#5 AthenaDX  Icon User is offline

  • D.I.C Regular

Reputation: 101
  • View blog
  • Posts: 306
  • Joined: 26-October 12

Re: Google search

Posted 08 November 2012 - 10:07 AM

Examples should help you understand what is going on, and if not, google will usually help you find explanations via forums or other websites. You don't want to use a bit of code that you don't understand how it works. Otherwise, you'll be forced to find that bit of code once again when you encounter the same problem.

Not sure if that helped. Unsure as to what you're asking for. :dontgetit:
Was This Post Helpful? 0
  • +
  • -

#6 danzar  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 108
  • Joined: 10-December 08

Re: Google search

Posted 08 November 2012 - 10:26 AM

View PostAthenaDX, on 08 November 2012 - 10:07 AM, said:

Examples should help you understand what is going on, and if not, google will usually help you find explanations via forums or other websites. You don't want to use a bit of code that you don't understand how it works. Otherwise, you'll be forced to find that bit of code once again when you encounter the same problem.

Not sure if that helped. Unsure as to what you're asking for. :dontgetit:


Your first answer was on the money.
Was This Post Helpful? 0
  • +
  • -

#7 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 386
  • View blog
  • Posts: 2,657
  • Joined: 12-January 10

Re: Google search

Posted 08 November 2012 - 10:30 AM

I look up stuff all the time and I use this forum all the time.
As in most programs you may make in the future, you will more likely use more then 1 language in the app itself and tryign to remember everything is nearly impossible.

Look for examples and try to figure out what they do is key but dont copy and paste the code because you will never know how it really works that way.
You will also find that sometimes the example you might want or need is a pay item so you might get frustrated on that and have to do the tinkering yourself.
Was This Post Helpful? 0
  • +
  • -

#8 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 571
  • View blog
  • Posts: 2,979
  • Joined: 19-May 09

Re: Google search

Posted 02 December 2012 - 09:52 PM

Upvoted the OP for doing what most beginning programmers won't do to save their life, or at least their reputation. Danzar, you have the right attitude, and most people just don't get this. Just for fun, have a look at this. The fact of its existence shows that most people don't have the dedication that you have in teaching yourself how to write good code. Keep up the good work! :)

This post has been edited by BobRodes: 02 December 2012 - 09:54 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1