• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to use Google efficiently!

 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
When i was surfing through this forum I found an interesting quote .

he other guy whatever the complex task is given he will have a solution in a day. He usually gets the information from google and get the task done. Even if he does not know a language he use to get the code snippet from google.
So I often wonder even he might have a solution in a day if a problem in rocket science is given.



How some geeks use google efficiently in finding code solutions for the implementation they want.
Is there any approach which is efficient in finding the solutions through Google?

Regards.
 
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well ramya

To search in Google there are no rules... just try to use different combination of keywords, use more familiar words and try different forums, search into them.

These are the things that I do. If someone has anything better than this then please share the on information.
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be this is helpful-

www.koders.com
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you google it?
[ November 21, 2008: Message edited by: Ramesh Srinivasan ]
 
Ranch Hand
Posts: 1479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Himanshu Gupta:
Well ramya

...use more familiar words and try different forums.. .



I get too many non relevant results using any words in common usage, so generally I start with the most specific, the most narrow, and most detailed description of issue or problem or task.

As one example, I simply cut and paste details of database errors messages into search. Sometimes you won't know the detailed term of what you need to research so it takes 2 stages, first to get general idea and discover new terms related to what you need to know. Then second stage is using the newly learned specific terms in a new search.
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes herb. When we try to search for error and exception the best practice is to simply copy and paste the code in the search Bar.

But if in case we want to search for the sample code or sample application then we do have to think for most catching and easy sentence or combination of words to get maximum relevant search results.
 
Bartender
Posts: 9612
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by ramya narayanan:

How some geeks use google efficiently in finding code solutions for the implementation they want.



As I said in the source of your quote, I sincerely doubt that someone could write a non-trivial functioning program by piecing together snippets of code that they find on the net. I'd really like to be a fly on the wall to see what's really going on at Mohamed's workplace.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Joe,
It is possible to get the code snippets from Google and complete a complex program. I don't have any doubt in this. However I too agree that a novice can't do that. It requires some experience in programming.

For instance, if a task is given to read the records of employees from a file, sort the records based on the Employee salary field and store the sorted records into a different file. Let us assume I have to write it in some language say PERL which I don't know.

There are two approaches now in front of you.

In the first approach, One is learning the important language constructs which is PERL in our case(I am not asking one to be an expert. Just learn). It will take say 3-5 days and then implement the solution. Let us say implementing it will take another 2 days. So we have the solution in hand say in 7 working days.

The benefit of this approach is you have the solution at the same time you learnt some new language. The negative side is you have a solution in 7 days which is bit longer.

The second approach is, google it for the PERL code snippets. For example,
to achieve the task, 1) we want to know how to read the records from file, 2) how to parse each records with delimiter, 3) how to store it in an array, 4) how to sort an array, 5) how to write the records in the sorted array into a file. So once we get the code snippets for these subtasks from google all we can do is just assemble the code and run it.
All you require is some analytical skills.

The benefit with the second approach is that you have some solution for a given problem in 1 hour and you get a good appreciation from your Manager.
The negative is that you don't know the langauge. In other words, you don't feel like you accomplished some task. In other words, a mental satisfaction.

Thanks & Regards,
Mohamed
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ways you are talking about has both positive and negative side.

For the fast performer who don't lay much stress on learning but keeps his focus on getting the job done will suffer as new changes starts coming in.And it is sure that changes will come. Now if you know that code then it becomes a lot easier to tweak or modify it and keeping the numbers on hours required to minimum. But on other hand if you have just copied the code and you dont know that how it is working then you have to rework all those things again. At that time things will become really scary unless you are very lucky to get code again on net.


So the deciding factor is the priority of the task.
 
author & internet detective
Posts: 39997
807
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Mohamed Alla Pitchai:
It is possible to get the code snippets from Google and complete a complex program. I don't have any doubt in this.


I have some doubt. I agree with Joe that I don't think someone could write a non-trivial program without understanding what is going on.


Let us assume I have to write it in some language say PERL which I don't know.


Is this an ongoing problem? Do you often get assignments in a variety of languages you don't know? Do they repeat? Maybe it would be good to learn a couple languages on your own time so you do know them?

As a challenge, I am going to see what happens if I try your Perl example. I last used Perl to write a non-trivial program seven years ago. So I did know it better at one point, but have likely forgotten most of it thru disuse. I do use UNIX scripting regularly so I think I am at an adequate level to try this.

It took me 18 minutes to look up and write what is below the line. I don't have a Perl interpretter on my machine so I can't try it. But I would be shocked if this doesn't have syntax errors let alone works. In fact, it has a logic flaw - if two employees have the same salary, only one will get stored. Which makes the whole thing useless to anyone who tries to Google it in the future)

Interestingly, this shows why analysis is important. Someone needs to understand the algorithm, not just search on google.

There's also an aspect of this that shows choosing the right tool is important. Unless this needed to run on Windows, I wouldn't use Perl. I would use UNIX/awk/sed and so the whole thing on one line. It would be done in less than an hour and be less code. This is another place experience adds value. How does Google tell you what is the best language for the job?

In this example, I agree with the manager that approach #2 is better. It's a fairly simple thing to do so why spend a long time on it?

I agree with you that the Google part is easy. It's the assembly/understand that's the value we bring as developers.

Also, this is a fairly small example. Where I work, things are way more complex and I wouldn't be able to Google much. I think this is why I say I tend to use this approach more to look up UNIX commands than Java code.

I also have a rule of thumb where I write down anything I Google and don't understand so I can go back to it later and understand it before I need it again.
-------------------------------------------------------------

1) we want to know how to read the records from file,
Source: http://www.perlfect.com/articles/perlfile.shtml [first Google hit]
open FILE, "filename.txt" or die $!;

2) how to parse each records with delimiter,
Source: same site as #1
while (<FILE>) {

2.5) how to parse columns [I added this step]
Source: http://perl.about.com/od/filesystem/a/perl_parse_tabs.htm [first Google hit on my query: perl parse columns]
chomp;
($id, $salary, $name) = split("."); # assuming format since it wasn't specified

3) how to store it in an array
Source: http://www.comp.leeds.ac.uk/Perl/associative.html [After a couple tries searching for "map", it came back to me that those are called associative arrays.]
$map[$salary] = "$id,$name";

4) how to sort an array,
Source: http://www.htmlite.com/perl016.php [first google hit]
sort($map);

5) how to write the records in the sorted array
Source: same site as #1
Source: http://www.ebb.org/PickingUpPerl/pickingUpPerl_6.html [this one took a couple google tries and was found on perl loop associative array]
open FILE2, "output.txt" or die $!;
while (($key, $value) = each(%map)) {
print "$value";
}
close(FILE2);

5.5) Close file [you didn't list this, but let's assume it's part of #1]
Source: same site as #1
close FILE or die $!
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this "programming by Google" is really just a new name for Cargo Cult Programming, in which bits and pieces are pasted together by folks who don't understand them, to produce a program which nobody understands, but which seems to work. Sad to say, there's an awful lot of code written this way in the real world, as a half-hours perusal of The Daily WTF will show you.

Anyway, my thesis here is that shops exist where Jeanne's program would be randomly tweaked until it seemed to work, then pushed to production. And there are indeed people who spend their careers doing that over and over and over.
 
Marshal
Posts: 25594
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good grief. Well, the first amazing thing I see there is that you're planning to do this simple task in PERL. Where I work that task would be one (1) line of code and any of our programmers could write it in under a minute. No wonder there's so much material for the Daily WTF.
 
Joe Ess
Bartender
Posts: 9612
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Ernest Friedman-Hill:
I think this "programming by Google" is really just a new name for Cargo Cult Programming,



Have a look at the original thread. Mohamed claims that his coworker who ascribes to the "programming by Google" methodology is by far more productive than him. I'd assume if his coworker were "cargo cult programming", he'd be less productive than someone who tried to understand the task at hand.
 
Jeanne Boyarsky
author & internet detective
Posts: 39997
807
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree the co-worker has more productivity than a cargo-cult programmmer.

I was trying to illustrate how Google can help a good programmer but doesn't replace the need for understanding. I also tried to highlight that this only works for simple problems.
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ramya,

I am one of the effective Googler. You will be surprised if I go on telling what kind of information I've got from google in my life! That led me to explore/hack more on Google, and conduct programs like 'Google War' (google search contest) in my college during our course tenure

If you become master in Google, then it means you earned a unauthorized Phd in information retrieval

Btw, if you want to test your googling skill, check my blog post here: Test your Google Searching Skills
 
All of the following truths are shameless lies. But what about this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic